How to access loaded rebar shapes

How to access loaded rebar shapes

Anonymous
Not applicable
468 Views
1 Reply
Message 1 of 2

How to access loaded rebar shapes

Anonymous
Not applicable

Hello All,
This is my first time using CreateFromRebarShape Method.
How can I access a loaded rebar shape in doc?

For rebartypes, I found an old example using "doc.RebarBarTypes" but I can not even find that property in the API document. Do we have something like doc.RebarShapes?

 

Thanks

0 Likes
469 Views
1 Reply
Reply (1)
Message 2 of 2

jeremytammik
Autodesk
Autodesk

Your loading process adds new elements to the database, I assume.

 

You could track those newly added elements by subscribing to the DocumentChanged method like we do in this example tracking elements added by the PromptForFamilyInstancePlacement method:

 

https://thebuildingcoder.typepad.com/blog/2010/06/place-family-instance.html

 

Alternatively, you can simply make a note of the largest element id before loading, and then retrieve all larger element ids afterwards.

 

Here are other methods and tools to use to research how to solve a Revit API programming task:

 

https://thebuildingcoder.typepad.com/blog/2017/01/virtues-of-reproduction-research-mep-settings-onto...

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder