Question about why or how Revit Exposes specific Geometry

Question about why or how Revit Exposes specific Geometry

cmccombsY5X49
Explorer Explorer
428 Views
2 Replies
Message 1 of 3

Question about why or how Revit Exposes specific Geometry

cmccombsY5X49
Explorer
Explorer

(Note: all my testing is from Revit 2023 and only some has been verified to act the same in 2021) Sorry about how vague the title is. First, context, when viewing an element's geometry within the active view, including non-visibile objects, which geometry maintains its references differs based on element category and subtype. For example, an element, of category "Pipe Fitting" may have its geometry presented differently than the same element with the "Generic Models" category. And at the same time, an element with the "Pipe Fitting" category will present / expose different geometry based on the "Part Type". I could not find documentation regarding this so I made a post here.

 

Steps to reproduce, I have an "Pipe Fitting" element of Part Type of "Multiport" ( attached below ). Its is made up of a single revolve with a static radius with its length being constrained to two Reference Planes ( where the distance between is determined by an instance variable "Distance" ).  There is a single Model Line with the Subcategory "Center line" set as a "Weak Reference", it is constrained to have each end point be at the intersection of the two outside Reference Planes and the "Center (Front/Back)" Reference Plane.

cmccombsY5X49_0-1711037683107.png

cmccombsY5X49_5-1711038066970.png

cmccombsY5X49_6-1711038099969.png

 

 

But if I change that same element to have the PartType "Transition", the exposed geometry within the active view changes. 

 

cmccombsY5X49_3-1711037853138.png

cmccombsY5X49_4-1711037885044.png

It isn't just the geometry in the active view, but the geometry presented in the Undefined View can change as well.

In a more advanced model ( I cannot provide as it is company property ) with faces that can move ( such as a Pipe Fitting with the PartType Tee with a PlanarFace at a variable angle ), within an undefined view, the faces and edges are just absent in the symbol geometry and instance geometry. But if I change the PartType to something else like Mutiport, those geometries reappear. I can't link the file, but I provided the picture of the lack of a solid containing valid face and edge geometries with references.

cmccombsY5X49_7-1711038892697.png

 

What determines this? I can tell that having parametric geometry can cause certain geometries to be exposed differently, but I don't quite understand why the geometries are exposed differently based on PartType. I assume this is why I am unable to dimension to any Pipe Fitting Tees' Center lines directly. Using API calls, I am able to create dimensions. But if I change the Tee to a different PartType, I can now manually create dimensions.  I can work around it by nesting my centerline within a component element of either a Generic Model or a Pipe Fitting (with something other than the Tee PartType), and dimensioning to that instead also works will maintaining Routing Preferences and such. Any help is appreciated, thanks.

0 Likes
Replies (2)
Message 2 of 3

TripleM-Dev.net
Advisor
Advisor

Hi,

 

I don't know what you mean with "PartType", but pipes etc have normally different geometric representations for each detail level, mostly there's only actual geometry in Level Fine.

 

But reading further you want to dimension them, then you minimal need to take the view as argument in the option when retrieving geometry (and computereferences) else dimensioning won't work. I have posted several reactions to dimensioning (search forum, depending needs). I mostly build te dimension references stablereference string myself (some explanation here: stable-reference-string-magic-voodoo)

 

Also see: Geometry Property info regarding ComputeReferences for valid references.

 

If it's about dimensioning, dimension the parts/pipes in the UI and then inspect the References of the dimensions with RevitLookup, and try to re-create it in the API and built on that.

 

- Michel

0 Likes
Message 3 of 3

cmccombsY5X49
Explorer
Explorer

Thanks for the reply and for the link to the resource with stablereference strings. I wasn't completely sure how to reconstruct and manipulate the strings to get the desired geometry. To clarify though, I understand a good amount of the dimensioning and geometry process and have something working for what I need. My question however was regarding the how factors such as Part Type and parameter-driven geometry affect the way the geometric references are exposed. Below is a snippet showing where you can find the Part Type parameter. It basically is how the Routing Preferences categorizes and connects elements.

cmccombsY5X49_1-1711113289699.png

Looking at the original snippets were should a link to where I have shown how just changing the Part Type can change what geometry is exposed. An extension of this question might be what can cause GeometryObjects that are labeled as ElementGeometry have a null reference. I am unsure about Part Type, but from what I can tell, is that geometry that is parameter driven can cause geometry to be exposed. By the way, I am defining 'exposed" geometry is just the geometry that is being presented when viewing the geometry directly or within a GeometryInstance from the element.get_geometry(...).  For example, the each endpoint on every single model line is not necessarily shown even if the "fine" quality level is selected. Hopefully this didn't make my question (s) more confusing.

0 Likes