|
TNTmips Downloads Menu

|
elemlist.sml
# elemlist.sml
# demonstrates how to get a list of elements of a specified
# type in a block
# define array to hold element list - will be resized to fit
array numeric elemlist[10];
numeric elem;
clear();
cad C;
GetInputCAD(C);
numeric numElem = CADNumElements(C, 1);
# get list of lines
numeric numLines = CADGetElementList( C, 1, "Line", elemlist );
printf("number of elements: %4d number of lines: %4d \n", numElem, numLines);
print("Line list:\n");
for elem = 1 to numLines {
printf("%4d %4d\n", elem, elemlist[elem]);
}
CloseCAD(C);
©MicroImages, Inc. 2013 Published in the United States of America
11th Floor - Sharp Tower, 206 South 13th Street, Lincoln NE 68508-2010 USA
Business & Sales: (402)477-9554 Support: (402)477-9562 Fax: (402)477-9559
Business info@microimages.com
Support support@microimages.com
Web webmaster@microimages.com
| |