PDA

View Full Version : Method to determine the count of coordinates in a 3dpolyline object



coondog45
2009-01-19, 12:29 AM
I am trying to write a sub to factor the z component of the vertex coordinates in a 3d poly line. I can access the z component by applying my factor to every 3rd coordinate in the array. My question is .. what would be a good method to establish the extents of the count to use in my loop to modify the data. I there a count available for the Coordinates collection? The 3dpolylines I will be modifying will have various numbers of vertices. Maybe I could just loop every third element until I run out ? Maybe use a boolian comparison for the while condition. Thanks for any advice.
John C

RobertB
2009-01-19, 08:03 PM
There is no Count property, but a little math goes a long way:

(UBound(myCoords)+1)/3

coondog45
2009-01-22, 11:55 PM
Thanks Robert
I think I can get it now.