ArcPad Scripting Object Model
Points Collection
See Also  Members  Send comments on this topic.

Glossary Item Box




A Points object is a shape that represents a set of points in space. A Points object is a collection of Point objects, and can be used to represent a MultiPoint shape or the vertices of a part of a Line or Polygon.


A Points object is a creatable object in ArcPad. Here's an example of creating a new Points object:

Dim pPoints
Set pPoints = Application.CreateAppObject("points")
Polygon and Line objects have a Parts collection, each Item in that collection representing one part of a multi-part shape. Polygon and Line objects with a single part also have a Parts collection, with only one member. Each Item in the Parts collection is a Points object, each Point in that collection represents one vertex of the shape. To add points that represent vertices to a new Line or Polygon object you must first create a Points object and then add to it Point objects representing each vertex of that part. Once you have built up the part, add the Points object to the Parts collection. For example:

Dim pPolygon, pPoints, pPt

Set pPolygon = Application.CreateAppObject("Polygon")
Set pPoints = Application.CreateAppObject("Points")
Set pPt = Application.CreateAppObject("Point")

pPt.X = 100
pPt.Y = 100
pPoints.Add pPt

pPt.X = 250
pPt.Y = 400
pPoints.Add pPt

pPt.X = 400
pPt.Y = 100
pPoints.Add pPt

pPt.X = 100
pPt.Y = 100
pPoints.Add pPt

pPolygon.Parts.Add pPoints

See Also

© 2012 All Rights Reserved.