subblock.sml

  Download

More scripts: C A D

Syntax Highlighing:

comments, key words, predefined symbols, class members & methods, functions & classes
            
# subblock.sml
# demonstrates creating and inserting a subblock
cad C;
GetOutputCAD(C);
# first create a box in block 1
CADWriteBox(C, 1, 0, 0, 100, 100, 0);
# now create a subblock
CADCreateBlock(C,"BLOCK2", "subblock");
# create a small box in the subblock
CADWriteBox(C, 2, 0, 0, 10, 10, 45);
# now insert with replication - create a grid
numeric destblock = 1, sourceblock = 2;
numeric xinsert = 0, yinsert = 0, xScale = 1, yscale = 1, rotate = 0;
numeric numlines = 10, numcols = 10, linespace = 10, colspace = 10;
CADInsertBlock(C, destblock, sourceblock, xinsert, yinsert,
xScale, yscale, rotate, numlines, numcols, linespace, colspace);
CloseCAD(C);