Display full version of the post: vba - get objects property - VBA for LIST command

katto01
22.08.2013, 17:20
Hello,
 
I am trying to get the properties of all objects in a drawing.
Something like using the LIST command in a loop for all objects.
Say I have 100 AcDbPolylines, and I need to extract the coordinates of the points for each of them for further calculations.
Interactively I would click on a polyline at a time, click list, and copy (by hand) the coordinates of the points.
I would like to use this process in VBA in a loop.
I did extensively searched for an answer to this question and found nothing.
Thank you

Kent Cooper
22.08.2013, 23:41
When you say "the properties of all objects," that's pretty wide open [most objects have a lot of properties].  But in the case of Polyline vertices, there are several ways to extract them, for example out of DXF-code-10 entries in the entity data, or from the VLA Coordinates property.  In what form do you need the vertex points once they've been extracted?  Collected into a Lisp list?  Written to a file, and if so, what kind?  And can they be merely listed, or do they need to be subdivided somehow, e.g. those of a particular Polyline grouped together separately from those of others?  And do they need to have X, Y and Z coordinates [for LWPolylines, neither source mentioned contains the Z coordinates with the X & Y of the vertex locations, so you'd need to add it from the Polyline's Elevation]?  More of an idea of how you would be using the information would help.