xBimTeam / XbimGeometry

XbimGeometry contains the CLR interop libraries and the c++ engine used to compute the 3D geometry of models.
https://xbimteam.github.io/
Other
255 stars 128 forks source link

How to get subcomponent of any element in xbim? #488

Closed ashvinisawantsofttechengr closed 2 months ago

ashvinisawantsofttechengr commented 3 months ago

public override string GetPlotName(BIMDCREnums.clsEnums.ModelType model, int buildingNo) { string Name = string.Empty; try { var m_compIFCSite = ClsECC.m_clsExecCtxCmp.GetComponent(model, BIMDCREnums.clsEnums.EC.IFCSITE, buildingNo); foreach (Component compsurface in m_compIFCSite.GetSubcomponents()) { Name = compsurface.GetName(); } } catch (System.Exception) {

if DEBUG

            throw;

endif

        }
        return Name;
    }

Want to get subcomponent of IfcSite.

andyward commented 3 months ago

Does this example help? https://docs.xbim.net/examples/spatial-hierarchy.html