[SLVD]Automate Elements selection that are on specific layer
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2017-06-08
11:59 AM
- last edited on
2022-12-06
02:06 PM
by
Daniel Kassai
2017-06-08
11:59 AM
Hi to all AC developer community!
Have one little question - how I can through AC API select all specific Elements (for example: polylines) that are on specific layer (e.g.: Layer name: 2d - polylines).
Thank You in advance!
Dmytro Radomtsev.
Have one little question - how I can through AC API select all specific Elements (for example: polylines) that are on specific layer (e.g.: Layer name: 2d - polylines).
Thank You in advance!
Dmytro Radomtsev.
Labels:
- Labels:
-
Add-On (C++)
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2017-06-09 05:16 AM
2017-06-09
05:16 AM
DimRad wrote:Hello Dmytro,
Hi to all AC developer community!
Have one little question - how I can through AC API select all specific Elements (for example: polylines) that are on specific layer (e.g.: Layer name: 2d - polylines).
Thank You in advance!
Dmytro Radomtsev.
First get the attribute index of the "2d - polylines" layer with ACAPI_Attribute_Search().
You'll have to get all polyline elements with ACAPI_Element_GetElemList (), then iterate through the returned array, get each element's header with ACAPI_Element_GetHeader (), and check the 'layer' member of the header. Note that if the rgr_layer of that element is not 0, than the element is coming from a hotlinked module.
This will get you all the polylines on the floor plans; if you need polylines specific to the layouts or drawn directly onto elevations or details, then you have to switch to those databases, and repeat the same procedure.
Best, Akos
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2017-07-20 10:51 AM
2017-07-20
10:51 AM
Thank You for help, that's work!