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: 

Retrieve CUT_EDGE References from walls

7 REPLIES 7
Reply
Message 1 of 8
josepht21
666 Views, 7 Replies

Retrieve CUT_EDGE References from walls

Hi everybody!

I am trying to get the CUT_EDGE references of a given wall using the API. At the moment I can get part of the references based on the Wall geometry. I first go to the Solids and for each edge of the solid I check if the Reference is of type CUT_EDGE. This works but does not get all the options (I see more when generating a dimension line manually in the UI of Revit). 

For example I have the wall seen in the image with the dimension that is attached to the CUT_EDGE references: 
3aecdde0-f1aa-42b2-a208-f740e7a17720-003f7f7f:8:CUT_EDGE/0/1 and 3aecdde0-f1aa-42b2-a208-f740e7a17720-003f7f7f:8:CUT_EDGE/1/1. But when I run over all the edges of the wall I only get the following options (see image attached).

josepht21_0-1696159063311.png


I played already with the visibility and detail options and nothing helps. 

josepht21_1-1696159131094.png

 


@jeremy_tammik 

Labels (5)
7 REPLIES 7
Message 2 of 8
jeremy_tammik
in reply to: josepht21

Did you test using the IncludeNonVisibleObjects property?

  

https://www.revitapidocs.com/2024/0d277b80-d5e5-1151-d413-b0899da0976f.htm

  

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

Yes, I did use that property. I think knowing better what the structure of this stable representation means could help a lot 3aecdde0-f1aa-42b2-a208-f740e7a17720-003f7f7f:8:CUT_EDGE/0/1.
Message 4 of 8
jeremy_tammik
in reply to: josepht21

I can imagine that a CUT_EDGE reference is generated dynamically by a cut, so you cannot retrieve it from any existing BIM element geometry. It is the result of a cut between more than one element, and no single element or element geometry can provide that.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 5 of 8
josepht21
in reply to: jeremy_tammik

So here is my finding that actually worked, for example using the Stable Representation 3aecdde0-f1aa-42b2-a208-f740e7a17720-003f7f7f:8:CUT_EDGE/0/1.

3aecdde0-f1aa-42b2-a208-f740e7a17720-003f7f7f: Refers to the element itself

8: Is the ID of the face of the Revit Element.

CUT_EDGE/0/1: This is the type and location of the Reference. It is CUT_EDGE type and the 1 means which edge of the face and the 0 the end-point of it.

My original findings were correct I was just missing the index of the end-point of the edge I found. All this is possible to find via the Edges of the Solids that are part of the geometry of an Element.

Message 6 of 8
jeremy_tammik
in reply to: josepht21
Message 7 of 8
jeremy_tammik
in reply to: josepht21

Edited our conversation and added to the blog:

  

https://thebuildingcoder.typepad.com/blog/2023/10/no-geometry-touching-geometry-and-cut-geometry.htm...

  

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

Amazing! Thanks

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

Post to forums  

Autodesk Design & Make Report