home products news downloads documentation support gallery online maps resellers search
TNTmips Downloads Menu

HOME

CONTACT US

CURRENT RELEASE
  TNT 2013

DEVELOPMENT VERSION
  TNT 2014

TNTmips Pro
PRIOR RELEASES
  TNT 2012

FREE SOFTWARE
  TNTmips Free
  TNTatlas
  TNTsdk

MORE DOWNLOADS
  HASP Key Driver
  Screen Recorder
  TNT Language Kits
  Sample Geodata
  TNT Scripts

DOCUMENTATION
  TNTmips Tutorials
  Tutorial Datasets
  Technical Guides
  Scripts
  Quick Guides

MORE INFO
  Download FAQs
  FTP
  Download Managers
  Find Reseller

SITE MAP


poly.sml


# poly.sml
# demonstrate creating and reading a polygon CAD element
clear();
cad C;
array numeric xPoints[1000];
array numeric yPoints[1000];

GetOutputCAD(C);

# define the polygon (triangle)
xPoints[1] = 0;
yPoints[1] = 0;
xPoints[2] = 100;
yPoints[2] = 0;
xPoints[3] = 50;
yPoints[3] = 100;

numeric numberPoints = 3; # polygon will automatically close to last point
CADWritePoly(C, 1, numberPoints, xPoints, yPoints);

# now read and print out the points
numberPoints = CADReadPoly( C, 1, 1, xPoints, yPoints);

print("polygon point list:\n");
numeric elem;
for elem = 1 to numberPoints {
	printf("%4d %6.2f %6.2f\n", elem, xPoints[elem], yPoints[elem]);
	}
	
CloseCAD(C);


Back Home ©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

25 March 2009

page update: 26 May 11