Export polyline data (area, layer and inner text) to excel

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, everyone!
I am searching for a macro that can find all polylines in a drawing and export to excel their following information:
-Text inside each polyline
-Area of each polyline
-Layer to which the polyline belongs
-Whether the polyline is closed or not (Yes or No)
-Handle ID
I have a building plan (in attachment) with polylines enclosing each room and the corresponding room text number inside the polyline. I am looking for a macro that can export to excel a table like this:
Text inside polyline | Polyline Area (m2) | Polyline Layer | Closed | Handle ID |
1.1 | 51.34 m2 | Room Layer | Yes | XXX |
1.2 | 28.75 m2 | Room Layer | Yes | XXX |
1.3 | 14.41 m2 | Room Layer | Yes | XXX |
1.1, 1.2, 1.3 | 100.75 m2 | Floor Layer | Yes | XXX |
The polylines and room text numbers are located in different layers.
One of the polylines (last row in the table) encloses the whole building, which means that there is more that one text inside it.
Polylines without text numbers should also appear in the table
I am fairly new to VBA so any help you can provide would be highly appreciated!
Thanks in advance!