Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Rebar Coupler Geometry from Linked Revit model

3 REPLIES 3
Reply
Message 1 of 4
DonnyVA
265 Views, 3 Replies

Rebar Coupler Geometry from Linked Revit model

Hi all,

 

I'm trying to get the geometry of rebar couplers from a linked Revit model.

I've used the RevitLookup add-in, searched this forum and the internet but I haven't found a solution yet.

 

If I explore the API with RevitLookup in the model that contains the actual rebar coupler, the "Geometry (Options)" property returns a list or IEnumerable of "GeometryInstance" in the "Active view".

DonnyVA_0-1707814770873.png

So far so good.

 

But, if I explore the API in a model that has a linked Revit model that contains this rebar coupler, I get different results. "Active view" doesn't return any list or IEnumerable.

DonnyVA_1-1707815152004.png

 

"Active view, including non-visible objects" returns a "Line" object. And no, this Line object is not helpful.

DonnyVA_3-1707815682116.png

 

But this is weird because the rebar coupler is visible, the "IsHidden (View)" property is also False.

DonnyVA_2-1707815415486.png

 

All other "Model" views return also nothing or a "Line" object.

Am I missing something here?

 

I'm going to investigate other methods like "GetPointsForPlacement".

Maybe I can use that to create geometry from this coupler.

 

Thanks

Labels (3)
3 REPLIES 3
Message 2 of 4
jeremy_tammik
in reply to: DonnyVA

After you linked the model, check the Application object list of documents:

  

  

The linked document is listed there. Snoop the linked document instead of the main project document, retrieve your linked element from it, and explore that element's geometry. It should include the GeometryInstance objects that you need.

  

Much success, good luck and have fun.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 3 of 4
DonnyVA
in reply to: jeremy_tammik

Hi Jeremy,

 

If I use "Snoop Linked Element" and then select the rebar coupler from the linked model, I get this:

DonnyVA_0-1707834488239.png

Document "MOG2... Caisson E7" is the linked model...

But still, only a "Line" object as IEnumerable.

 

I also tried:

  1. RevitLookup
  2. Dashboard
  3. Application
  4. Documents (DocumentSet)
  5. Caisson E7 model
  6. But then I get stuck on how to get the rebar coupler element

 

Message 4 of 4
DonnyVA
in reply to: jeremy_tammik

Hi Jeremy,

 

Have you had some time to look at this again, and try it yourself?

 

Greetings

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Rail Community