no MaterialElementId

no MaterialElementId

skabart1993
Explorer Explorer
311 Views
5 Replies
Message 1 of 6

no MaterialElementId

skabart1993
Explorer
Explorer

Hi everyone,

I retrieve the MaterialElementId for every face of the element's solid, but I notice that some faces do not have a MaterialElementId assigned. In the attached pictures, you can see RevitLookup for an architectural column. There are faces with and without a MaterialElementId; however, in Revit, all faces appear to be assigned with one material. I would appreciate it if somebody could explain this.

skabart1993_0-1712653667915.png

skabart1993_1-1712653711626.png

 

 

0 Likes
312 Views
5 Replies
Replies (5)
Message 2 of 6

jeremy_tammik
Alumni
Alumni

Pure conjecture, just for fun:

  

  • Only visible surfaces are assigned a material id, because it makes no sense for invisible surfaces
  • Some surfaces are caused by intersections or joins with other elements and are therefore hidden, not visible, covered

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 6

skabart1993
Explorer
Explorer

Thank you for quick reply,

 

As seen in the picture, there are six faces of the column, all of which are visible and not hidden.

0 Likes
Message 4 of 6

jeremy_tammik
Alumni
Alumni

Aha. Does the column display as expected? Are all six faces represented correctly? What material do they display? Maybe some of them have a default material assigned by category or some other overriding property, whereas others have a specific material assigned?

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 5 of 6

ricaun
Advisor
Advisor

I guess that's how Revit works.

 

If you create a family with geometry and do not assign any material, ElementId.InvalidElementId or -1 is assigned in the geometry.


And I am pretty sure Revit uses the Material in the Category in the document as a default Material to display to the user.

 

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

Message 6 of 6

nice3point
Advocate
Advocate

This material is contained in a private property that is not officially available, you can see this if you enable Non-public in RevitLookup. Try to check the property value in Solid or other geometric objects as well

nice3point_0-1712753575132.png