Hi all,
I was wondering if it is possible to retrieve the ElementId's of elements which are locked to other (known) elements. For example in my project I have a grid element and multiple wall elements locked to this grid with the align tool, lets say I know the ElementId of the grid element, is it possible to retrieve the ElementId's of the wall elements?
When I use the LookupTool on the grid element I can't seem to find any of the Wall elements ElmentId's, now I'm questioning if this is even possible?
Thanks,
Rob
The ID of a selected element can be found here: Manage tab > Inquiry panel > IDs of selection
I'm aware of the "ID's of Selection" button, however this is not what I'm after. I want to retrieve the ID's through the API (I did not explicitly mention this since I've asked this question in the API forum). Also I'm not after the ID of the current selection but I want to know the ID's of elements which are locked (constraint) to the current selection.
Hi,
to get an element's related elements, you could delete the element and look what has changed in the database.
After that, you can rollback your transaction.
Just search for "temporary transaction" on the TBC blog.
Revitalizer
I have no direct experience with this exact problem but I think the walls are attached to the grid using special Alignment Dimensions that have thier IsLocked property set to true. You can create them in the API with ItemFactoryBase.NewAlignment
To investigate your own solution I would suggest studying the API documentation fot the Dimension class to see what behaviour and data you can use to discover which dimensions are locking the walls to the grid. I'm not sure what the situation is when there is no visible dimension element but the alignment lock still remains (such as when you delete a locked dimension in the UI and it allows you to leave the lock in-place while the dimension itself is deleted.), maybe the dimension element remains in the document but is made invisible somehow (ViewSpecific property set to false maybe?).
good luck and Let us know how you get on.
I am not aware of any new developments in this area. Does anyone have a means to collect all elements that are constrained (locked) to a selected element?
Can't find what you're looking for? Ask the community or share your knowledge.