Пример #1
0
        /// <summary>
        /// Processes an IfcPropertySetDefinition.
        /// </summary>
        /// <param name="ifcPropertySetDefinition">The IfcPropertySetDefinition handle.</param>
        /// <returns>The IFCPropertySetDefinition object.</returns>
        public static IFCPropertySetDefinition ProcessIFCPropertySetDefinition(IFCAnyHandle ifcPropertySetDefinition)
        {
            if (IFCAnyHandleUtil.IsNullOrHasNoValue(ifcPropertySetDefinition))
            {
                Importer.TheLog.LogNullError(IFCEntityType.IfcPropertySetDefinition);
                return(null);
            }

            IFCEntity propertySet;

            if (IFCImportFile.TheFile.EntityMap.TryGetValue(ifcPropertySetDefinition.StepId, out propertySet))
            {
                return(propertySet as IFCPropertySetDefinition);
            }

            if (IFCAnyHandleUtil.IsSubTypeOf(ifcPropertySetDefinition, IFCEntityType.IfcElementQuantity))
            {
                return(IFCElementQuantity.ProcessIFCElementQuantity(ifcPropertySetDefinition));
            }
            if (IFCAnyHandleUtil.IsSubTypeOf(ifcPropertySetDefinition, IFCEntityType.IfcPropertySet))
            {
                return(IFCPropertySet.ProcessIFCPropertySet(ifcPropertySetDefinition));
            }
            if (IFCAnyHandleUtil.IsSubTypeOf(ifcPropertySetDefinition, IFCEntityType.IfcDoorLiningProperties))
            {
                return(IFCDoorLiningProperties.ProcessIFCDoorLiningProperties(ifcPropertySetDefinition));
            }
            if (IFCAnyHandleUtil.IsSubTypeOf(ifcPropertySetDefinition, IFCEntityType.IfcDoorPanelProperties))
            {
                return(IFCDoorPanelProperties.ProcessIFCDoorPanelProperties(ifcPropertySetDefinition,
                                                                            GetNextCounter(IFCEntityType.IfcDoorPanelProperties)));
            }
            if (IFCAnyHandleUtil.IsSubTypeOf(ifcPropertySetDefinition, IFCEntityType.IfcWindowLiningProperties))
            {
                return(IFCWindowLiningProperties.ProcessIFCWindowLiningProperties(ifcPropertySetDefinition));
            }
            if (IFCAnyHandleUtil.IsSubTypeOf(ifcPropertySetDefinition, IFCEntityType.IfcWindowPanelProperties))
            {
                return(IFCWindowPanelProperties.ProcessIFCWindowPanelProperties(ifcPropertySetDefinition,
                                                                                GetNextCounter(IFCEntityType.IfcWindowPanelProperties)));
            }

            Importer.TheLog.LogUnhandledSubTypeError(ifcPropertySetDefinition, IFCEntityType.IfcPropertySetDefinition, false);
            return(null);
        }