DimRad wrote:
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.
Hello Dmytro,
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