/// <summary>
        /// Updates the IFCExportOptions with the settings in this configuration.
        /// </summary>
        /// <param name="options">The IFCExportOptions to update.</param>
        /// <param name="filterViewId">The id of the view that will be used to select which elements to export.</param>
        public void UpdateOptions(IFCExportOptions options, ElementId filterViewId)
        {
            options.FileVersion            = IFCVersion;
            options.SpaceBoundaryLevel     = SpaceBoundaries;
            options.ExportBaseQuantities   = ExportBaseQuantities;
            options.WallAndColumnSplitting = SplitWallsAndColumns;
            options.FilterViewId           = VisibleElementsOfCurrentView ? filterViewId : ElementId.InvalidElementId;
            options.AddOption("ExportInternalRevitPropertySets", ExportInternalRevitPropertySets.ToString());
            options.AddOption("ExportIFCCommonPropertySets", ExportIFCCommonPropertySets.ToString());
            options.AddOption("ExportAnnotations", Export2DElements.ToString());
            options.AddOption("Use2DRoomBoundaryForVolume", Use2DRoomBoundaryForVolume.ToString());
            options.AddOption("UseFamilyAndTypeNameForReference", UseFamilyAndTypeNameForReference.ToString());
            options.AddOption("ExportVisibleElementsInView", VisibleElementsOfCurrentView.ToString());
            options.AddOption("ExportPartsAsBuildingElements", ExportPartsAsBuildingElements.ToString());
            options.AddOption("UseActiveViewGeometry", UseActiveViewGeometry.ToString());
            options.AddOption("ExportSpecificSchedules", ExportSpecificSchedules.ToString());
            options.AddOption("ExportBoundingBox", ExportBoundingBox.ToString());
            options.AddOption("ExportSolidModelRep", ExportSolidModelRep.ToString());
            options.AddOption("ExportSchedulesAsPsets", ExportSchedulesAsPsets.ToString());
            options.AddOption("ExportUserDefinedPsets", ExportUserDefinedPsets.ToString());
            options.AddOption("ExportUserDefinedParameterMapping", ExportUserDefinedParameterMapping.ToString());
            options.AddOption("ExportLinkedFiles", ExportLinkedFiles.ToString());
            options.AddOption("IncludeSiteElevation", IncludeSiteElevation.ToString());
            options.AddOption("SitePlacement", SitePlacement.ToString());
            options.AddOption("TessellationLevelOfDetail", TessellationLevelOfDetail.ToString());
            options.AddOption("UseOnlyTriangulation", UseOnlyTriangulation.ToString());
            options.AddOption("ActiveViewId", ActiveViewId.ToString());
            options.AddOption("StoreIFCGUID", StoreIFCGUID.ToString());

            // The active phase may not be valid if we are exporting multiple projects. However, if projects share a template that defines the phases,
            // then the ActivePhaseId would likely be valid for all.  There is some small chance that the ActivePhaseId would be a valid, but different, phase
            // in different projects, but that is unlikely enough that it seems worth warning against it but allowing the better functionality in general.
            if (IFCPhaseAttributes.Validate(ActivePhaseId))
            {
                options.AddOption("ActivePhase", ActivePhaseId.ToString());
            }

            options.AddOption("FileType", IFCFileType.ToString());
            string uiVersion = IFCUISettings.GetAssemblyVersion();

            options.AddOption("AlternateUIVersion", uiVersion);

            options.AddOption("ConfigName", Name);   // Add config name into the option for use in the exporter
            options.AddOption("ExportUserDefinedPsetsFileName", ExportUserDefinedPsetsFileName);
            options.AddOption("ExportUserDefinedParameterMappingFileName", ExportUserDefinedParameterMappingFileName);
            options.AddOption("ExportRoomsInView", ExportRoomsInView.ToString());
            options.AddOption("ExcludeFilter", ExcludeFilter.ToString());
            options.AddOption("COBieCompanyInfo", COBieCompanyInfo);
            options.AddOption("COBieProjectInfo", COBieProjectInfo);
            options.AddOption("IncludeSteelElements", IncludeSteelElements.ToString());
            options.AddOption("UseTypeNameOnlyForIfcType", UseTypeNameOnlyForIfcType.ToString());
            options.AddOption("UseVisibleRevitNameAsEntityName", UseVisibleRevitNameAsEntityName.ToString());
        }
        /// <summary>
        /// Updates the IFCExportOptions with the settings in this configuration.
        /// </summary>
        /// <param name="options">The IFCExportOptions to update.</param>
        /// <param name="filterViewId">The filter view.</param>
        public void UpdateOptions(IFCExportOptions options, ElementId filterViewId)
        {
            options.FileVersion            = IFCVersion;
            options.SpaceBoundaryLevel     = SpaceBoundaries;
            options.ExportBaseQuantities   = ExportBaseQuantities;
            options.WallAndColumnSplitting = SplitWallsAndColumns;
            if (VisibleElementsOfCurrentView)
            {
                options.FilterViewId = filterViewId;
            }
            else
            {
                options.FilterViewId = ElementId.InvalidElementId;
            }
            options.AddOption("ExportInternalRevitPropertySets", ExportInternalRevitPropertySets.ToString());
            options.AddOption("ExportIFCCommonPropertySets", ExportIFCCommonPropertySets.ToString());
            options.AddOption("ExportAnnotations", Export2DElements.ToString());
            options.AddOption("Use2DRoomBoundaryForVolume", Use2DRoomBoundaryForVolume.ToString());
            options.AddOption("UseFamilyAndTypeNameForReference", UseFamilyAndTypeNameForReference.ToString());
            options.AddOption("ExportVisibleElementsInView", VisibleElementsOfCurrentView.ToString());
            options.AddOption("ExportPartsAsBuildingElements", ExportPartsAsBuildingElements.ToString());
            options.AddOption("ExportBoundingBox", ExportBoundingBox.ToString());
            options.AddOption("ExportSolidModelRep", ExportSolidModelRep.ToString());
            options.AddOption("ExportSchedulesAsPsets", ExportSchedulesAsPsets.ToString());
            options.AddOption("ExportUserDefinedPsets", ExportUserDefinedPsets.ToString());
            options.AddOption("ExportLinkedFiles", ExportLinkedFiles.ToString());
            options.AddOption("IncludeSiteElevation", IncludeSiteElevation.ToString());
            options.AddOption("UseCoarseTessellation", UseCoarseTessellation.ToString());
            options.AddOption("TessellationLevelOfDetail", TessellationLevelOfDetail.ToString());
            options.AddOption("StoreIFCGUID", StoreIFCGUID.ToString());
            options.AddOption("ActivePhase", ActivePhaseId.ToString());

            options.AddOption("FileType", IFCFileType.ToString());
            string uiVersion = IFCUISettings.GetAssemblyVersion();

            options.AddOption("AlternateUIVersion", uiVersion);

            options.AddOption("ConfigName", Name);      // Add config name into the option for use in the exporter
            options.AddOption("ExportUserDefinedPsetsFileName", ExportUserDefinedPsetsFileName);

            options.AddOption("ExportRoomsInView", ExportRoomsInView.ToString());
        }
Exemple #3
0
        /// <summary>
        /// Updates the IFCExportOptions with the settings in this configuration.
        /// </summary>
        /// <param name="options">The IFCExportOptions to update.</param>
        /// <param name="filterViewId">The filter view.</param>
        public void UpdateOptions(IFCExportOptions options, ElementId filterViewId)
        {
            options.FileVersion            = IFCVersion;
            options.SpaceBoundaryLevel     = SpaceBoundaries;
            options.ExportBaseQuantities   = ExportBaseQuantities;
            options.WallAndColumnSplitting = SplitWallsAndColumns;
            if (VisibleElementsOfCurrentView)
            {
                options.FilterViewId = filterViewId;
            }
            else
            {
                options.FilterViewId = ElementId.InvalidElementId;
            }
            options.AddOption("ExportInternalRevitPropertySets", ExportInternalRevitPropertySets.ToString());
            options.AddOption("ExportAnnotations", Export2DElements.ToString());
            options.AddOption("Use2DRoomBoundaryForVolume", Use2DRoomBoundaryForVolume.ToString());
            options.AddOption("UseFamilyAndTypeNameForReference", UseFamilyAndTypeNameForReference.ToString());
            options.AddOption("ExportPartsAsBuildingElements", ExportPartsAsBuildingElements.ToString());

            options.AddOption("FileType", IFCFileType.ToString());
        }