|
TNTmips Downloads Menu

|
point.sml
# point.sml
# demonstrate creating and reading a point CAD element
clear();
# create a new file or open existing file
cad C;
GetOutputCAD(C);
# write a point
numeric xin = 100, yin = 200;
CADWritePoint(C, 1, xin, yin);
# the elements are always appended to end of block
# so get number of elements - last element will be our point
numeric lastelem = CADNumElements(C, 1);
# now read point data for most recently added element
numeric xCenter, yCenter;
CADReadPoint(C, 1, lastelem, xCenter, yCenter);
print("write and read CAD point");
print("element xCenter yCenter");
printf("%7d %8.2f %8.2f \n", lastelem, xCenter, yCenter);
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
| |