Rebar Coupler Geometry from Linked Revit model

Rebar Coupler Geometry from Linked Revit model

DonnyVA
Enthusiast Enthusiast
893 Views
3 Replies
Message 1 of 4

Rebar Coupler Geometry from Linked Revit model

DonnyVA
Enthusiast
Enthusiast

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

0 Likes
894 Views
3 Replies
Replies (3)
Message 2 of 4

jeremy_tammik
Alumni
Alumni

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
0 Likes
Message 3 of 4

DonnyVA
Enthusiast
Enthusiast

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

 

0 Likes
Message 4 of 4

DonnyVA
Enthusiast
Enthusiast

Hi Jeremy,

 

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

 

Greetings

0 Likes