xBimTeam / XbimWindowsUI

The home of XbimXplorer and WPF components for your desktop BIM applications.
Other
244 stars 150 forks source link

What is alternative for Type Name property? #214

Open ashvinisawantsofttechengr opened 1 month ago

ashvinisawantsofttechengr commented 1 month ago

In hoops Type name property is found but In XBIM there is no any property like type name property in identity data, Only Mark property is found. Is there any alternative for Type name property? e.g.( GetPropertySingleNominalValue("Identity Data", "Type Name"))

andyward commented 1 month ago

I'm assuming GetPropertySingleNominalValue(...) is looking at the Property/PropertySet data exported by the BIM authoring tool. While there are conventions, exactly where tools (like Revit) export their internal properties can be completely arbitrary (and definable by the export process & user), so generally best not to rely on those values for this kind of core data unless you have control over the wider process.

Type name can be got more reliably a couple of other ways:

  1. From an object's IsTypedBy relationship See Object Typing
  2. From the ObjectType attribute on every IfcObject

The first option is preferable. See IfcObjectType.IsTypedBy for how this works

I guess what Hoops is doing is exposing this type date in the properties, despite it not actually being a property.

e.g. In this example Revit has put a combination of the Type and Family Name into various properties in the 'Other' PropertySet. image

But the authorative value of the Type name is found via the IsTypedBy relationship. Xbim provides a DefiningType property which lists the primary IfcTypeObject and its Name

image