Control Polygon or Polyline object thru LabTalk


Version: 2020

Type: Features

Category: Programming

Subcategory: Labtalk

Jira: ORG-18764


  • <objectName>.PointCount

Suppose user has a polygon of 4 points, then script "polygon.pointcount =;" will return 4.

Also, can set polygon.pointcount=5 to add more points, then use polygon.x5= and polygon.y5= to specify the 5th point coordinates.

  • Get and Set XY coordinates to/from worksheet columns
// objname.GetXY(xDataset, yDataset); // copy from obj to dataset
// objname.SetXY(xDataset, yDataset); // copy from dataset to obj
// Ex:
polyline.getXY(book1_a, book1_b);
polyline.setXY(book2_a, book2_b);
polyline.getXY(book1_a); // copy only X values
polyline.getXY(, book1_b); // copy only Y values
  • Also when adding polygon, polyline, ESC will finish it.