/// <summary> /// Set the in-session configuration to cache. /// </summary> /// <param name="configuration">The the in-session configuration.</param> public static void SetInSession(IFCExportConfiguration configuration) { if (!configuration.IsInSession) { throw new ArgumentException("SetInSession requires an In-Session configuration", "configuration"); } s_inSessionConfiguration = configuration; }
/// <summary> /// Creates a builtIn configuration by particular options. /// </summary> /// <param name="name">The configuration name.</param> /// <param name="ifcVersion">The IFCVersion.</param> /// <param name="spaceBoundaries">The space boundary level.</param> /// <param name="exportBaseQuantities">The ExportBaseQuantities.</param> /// <param name="splitWalls">The SplitWallsAndColumns option.</param> /// <param name="internalSets">The ExportInternalRevitPropertySets option.</param> /// <param name="schedulesAsPSets">The ExportSchedulesAsPsets option.</param> /// <param name="userDefinedPSets">The ExportUserDefinedPsets option.</param> /// <param name="PlanElems2D">The Export2DElements option.</param> /// <param name="exportBoundingBox">The exportBoundingBox option.</param> /// <param name="exportLinkedFiles">The exportLinkedFiles option.</param> /// <returns>The builtIn configuration.</returns> public static IFCExportConfiguration CreateBuiltInConfiguration(string name, IFCVersion ifcVersion, int spaceBoundaries, bool exportBaseQuantities, bool splitWalls, bool internalSets, bool schedulesAsPSets, bool userDefinedPSets, bool userDefinedParameterMapping, bool PlanElems2D, bool exportBoundingBox, bool exportLinkedFiles, string excludeFilter = "") { IFCExportConfiguration configuration = new IFCExportConfiguration(); configuration.Name = name; configuration.IFCVersion = ifcVersion; configuration.IFCFileType = IFCFileFormat.Ifc; configuration.SpaceBoundaries = spaceBoundaries; configuration.ExportBaseQuantities = exportBaseQuantities; configuration.SplitWallsAndColumns = splitWalls; configuration.ExportInternalRevitPropertySets = internalSets; configuration.ExportIFCCommonPropertySets = true; configuration.Export2DElements = PlanElems2D; configuration.VisibleElementsOfCurrentView = false; configuration.Use2DRoomBoundaryForVolume = false; configuration.UseFamilyAndTypeNameForReference = false; configuration.ExportPartsAsBuildingElements = false; configuration.UseActiveViewGeometry = false; configuration.ExportSpecificSchedules = false; configuration.ExportBoundingBox = exportBoundingBox; configuration.ExportSolidModelRep = false; configuration.ExportSchedulesAsPsets = schedulesAsPSets; configuration.ExportUserDefinedPsets = userDefinedPSets; configuration.ExportUserDefinedPsetsFileName = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\" + name + @".txt"; configuration.ExportUserDefinedParameterMapping = userDefinedParameterMapping; configuration.ExportUserDefinedParameterMappingFileName = ""; configuration.ExportLinkedFiles = exportLinkedFiles; configuration.IncludeSiteElevation = false; // The default tesselationLevelOfDetail will be low configuration.TessellationLevelOfDetail = 0.5; configuration.UseOnlyTriangulation = false; configuration.StoreIFCGUID = false; configuration.m_isBuiltIn = true; configuration.m_isInSession = false; configuration.ActivePhaseId = ElementId.InvalidElementId; configuration.ExportRoomsInView = false; configuration.ExcludeFilter = excludeFilter; configuration.COBieCompanyInfo = ""; configuration.COBieProjectInfo = ""; return configuration; }
/// <summary> /// Constructs a copy from a defined configuration. /// </summary> /// <param name="other">The configuration to copy.</param> private IFCExportConfiguration(IFCExportConfiguration other) { this.Name = other.Name; this.IFCVersion = other.IFCVersion; this.IFCFileType = other.IFCFileType; this.SpaceBoundaries = other.SpaceBoundaries; this.ExportBaseQuantities = other.ExportBaseQuantities; this.SplitWallsAndColumns = other.SplitWallsAndColumns; this.ExportInternalRevitPropertySets = other.ExportInternalRevitPropertySets; this.ExportIFCCommonPropertySets = other.ExportIFCCommonPropertySets; this.Export2DElements = other.Export2DElements; this.VisibleElementsOfCurrentView = other.VisibleElementsOfCurrentView; this.Use2DRoomBoundaryForVolume = other.Use2DRoomBoundaryForVolume; this.UseFamilyAndTypeNameForReference = other.UseFamilyAndTypeNameForReference; this.ExportPartsAsBuildingElements = other.ExportPartsAsBuildingElements; this.UseActiveViewGeometry = other.UseActiveViewGeometry; this.ExportSpecificSchedules = other.ExportSpecificSchedules; this.ExportBoundingBox = other.ExportBoundingBox; this.ExportSolidModelRep = other.ExportSolidModelRep; this.ExportSchedulesAsPsets = other.ExportSchedulesAsPsets; this.ExportUserDefinedPsets = other.ExportUserDefinedPsets; this.ExportUserDefinedPsetsFileName = other.ExportUserDefinedPsetsFileName; this.ExportUserDefinedParameterMapping = other.ExportUserDefinedParameterMapping; this.ExportUserDefinedParameterMappingFileName = other.ExportUserDefinedParameterMappingFileName; this.ExportLinkedFiles = other.ExportLinkedFiles; this.IncludeSiteElevation = other.IncludeSiteElevation; this.TessellationLevelOfDetail = other.TessellationLevelOfDetail; this.UseOnlyTriangulation = other.UseOnlyTriangulation; this.StoreIFCGUID = other.StoreIFCGUID; this.m_isBuiltIn = other.m_isBuiltIn; this.m_isInSession = other.m_isInSession; this.ActivePhaseId = other.ActivePhaseId; this.ExportRoomsInView = other.ExportRoomsInView; this.ExcludeFilter = other.ExcludeFilter; this.COBieCompanyInfo = other.COBieCompanyInfo; this.COBieProjectInfo = other.COBieProjectInfo; this.SitePlacement = other.SitePlacement; }