/// <summary> /// Creates a handle representing an IfcCreateElementAssembly and assigns it to the file. /// </summary> /// <param name="file">The file.</param> /// <param name="globalId">The GUID of the IfcCreateElementAssembly.</param> /// <param name="ownerHistory">The owner history of the IfcCreateElementAssembly.</param> /// <param name="name">Name of the assembly.</param> /// <param name="description">Description of the assembly.</param> /// <param name="objectType">The object type of the assembly, usually the name of the Assembly type.</param> /// <param name="objectPlacement">The placement of the assembly.</param> /// <param name="representation">The representation of the assembly, usually empty.</param> /// <param name="tag">The tag of the assembly, usually represented by the Element ID.</param> /// <param name="assemblyPlace">The place where the assembly is made.</param> /// <param name="predefinedType">The type of the assembly, from a list of pre-defined types.</param> /// <returns>The handle.</returns> public static IFCAnyHandle CreateElementAssembly(IFCFile file, string globalId, IFCAnyHandle ownerHistory, string name, string description, string objectType, IFCAnyHandle objectPlacement, IFCAnyHandle representation, string tag, IFCAssemblyPlace? assemblyPlace, IFCElementAssemblyType predefinedType) { ValidateElement(globalId, ownerHistory, name, description, objectType, objectPlacement, representation, tag); IFCAnyHandle elementAssembly = CreateInstance(file, IFCEntityType.IfcElementAssembly); SetElement(elementAssembly, globalId, ownerHistory, name, description, objectType, objectPlacement, representation, tag); IFCAnyHandleUtil.SetAttribute(elementAssembly, "AssemblyPlace", assemblyPlace); IFCAnyHandleUtil.SetAttribute(elementAssembly, "PredefinedType", predefinedType); return elementAssembly; }
/// <summary> /// Processes IfcElementAssembly attributes. /// </summary> /// <param name="ifcElementAssembly">The IfcElementAssembly handle.</param> protected override void Process(IFCAnyHandle ifcElementAssembly) { base.Process(ifcElementAssembly); AssemblyPlace = IFCEnums.GetSafeEnumerationAttribute <IFCAssemblyPlace>(ifcElementAssembly, "AssemblyPlace", IFCAssemblyPlace.NotDefined); }
/// <summary> /// Creates an IfcFurnitureType, and assigns it to the file. /// </summary> /// <param name="file">The file.</param> /// <param name="guid">The GUID.</param> /// <param name="ownerHistory">The owner history.</param> /// <param name="name">The name.</param> /// <param name="description">The description.</param> /// <param name="applicableOccurrence">The attribute optionally defines the data type of the occurrence object.</param> /// <param name="propertySets">The property set(s) associated with the type.</param> /// <param name="representationMaps">The mapped geometries associated with the type.</param> /// <param name="elementTag">The tag that represents the entity.</param> /// <param name="elementType">The type name.</param> /// <param name="predefinedType">The predefined types.</param> /// <returns>The handle.</returns> public static IFCAnyHandle CreateFurnitureType(IFCFile file, string guid, IFCAnyHandle ownerHistory, string name, string description, string applicableOccurrence, HashSet<IFCAnyHandle> propertySets, IList<IFCAnyHandle> representationMaps, string elementTag, string elementType, IFCAssemblyPlace assemblyPlace, string predefinedType) { ValidateElementType(guid, ownerHistory, name, description, applicableOccurrence, propertySets, representationMaps, elementTag, elementType); IFCAnyHandle furnitureType = CreateInstance(file, IFCEntityType.IfcFurnitureType); IFCAnyHandleUtil.SetAttribute(furnitureType, "AssemblyPlace", assemblyPlace); if (ExporterCacheManager.ExportOptionsCache.ExportAs4) IFCAnyHandleUtil.SetAttribute(furnitureType, "PredefinedType", predefinedType, true); SetElementType(furnitureType, guid, ownerHistory, name, description, applicableOccurrence, propertySets, representationMaps, elementTag, elementType); return furnitureType; }
/// <summary> /// Processes IfcElementAssembly attributes. /// </summary> /// <param name="ifcElementAssembly">The IfcElementAssembly handle.</param> protected override void Process(IFCAnyHandle ifcElementAssembly) { base.Process(ifcElementAssembly); AssemblyPlace = IFCEnums.GetSafeEnumerationAttribute<IFCAssemblyPlace>(ifcElementAssembly, "AssemblyPlace", IFCAssemblyPlace.NotDefined); }