Esempio n. 1
0
        private IBimBuildingElement BaseConvertion(XbimBuildingElement xElement, Func<IBimBuildingElementType, IBimBuildingElement> elemConvFunc, Func<XbimBuildingElementType, IBimBuildingElementType> elemTypeConvFunc)
        {
            XbimBuildingElementType xElementType = xElement.ElementType;

            IBimBuildingElementType tElementType = null;
            if (xElementType != null)
            {
                tElementType = Target.GetBuildingElementType(xElementType.Guid);
                if (tElementType == null) tElementType = elemTypeConvFunc(xElementType);
            }

            IBimBuildingElement tElement = null;
            try
            {
                 tElement = elemConvFunc(tElementType);
            }
            catch (Exception e)
            {
                
                throw new Exception("Error while converting element '" + tElement.Name + "': " + e.Message);
            }
            
            PropertiesHelper.Convert(tElement.Properties, xElement.SingleProperties);

            return tElement;
        }
Esempio n. 2
0
 internal NRMQuantities(XbimBuildingElement elem) : base(elem.IfcBuildingElement, "NRM") { }