CAD Forum - Database of tips, tricks and utilities for AutoCAD, Inventor and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 7105
RSS channel - CAD tips RSS tips
RSS discussions

Discussion Discussion forum

 

HelpCAD discussion

 
CAD Forum - Homepage CAD discussion forum - ask any CAD-related questions here, share your CAD knowledge on AutoCAD, Inventor, Revit and other Autodesk software with your peers from all over the world. To start a new topic, choose an appropriate forum.

Please abide by the rules of this forum.

How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic Closedvba - get objects property - VBA for LIST command

 Post Reply Post Reply
Author
katto01 View Drop Down
Newbie
Newbie


Joined: 24.Jun.2009
Location: Japan
Using: ZWCAD
Status: Offline
Points: 17
Direct Link To This Post Topic: vba - get objects property - VBA for LIST command
    Posted: 22.Aug.2013 at 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

Back to Top
Kent Cooper View Drop Down
Senior Member
Senior Member


Joined: 12.Mar.2013
Location: United States
Using: AutoCAD2020, 2023
Status: Offline
Points: 629
Direct Link To This Post Posted: 22.Aug.2013 at 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.
Back to Top

Related CAD tips:


 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0,328 seconds.