Example #1
0
        /// <summary>
        /// Gets the file extension from selected configuration.
        /// </summary>
        /// <returns>The file extension of selected configuration.</returns>
        public String GetFileExtension()
        {
            IFCExportConfiguration  selectedConfig = GetSelectedConfiguration();
            IFCFileFormatAttributes selectedItem   = new IFCFileFormatAttributes(selectedConfig.IFCFileType);

            return(selectedItem.GetFileExtension());
        }
Example #2
0
        /// <summary>
        /// Initializes the comboboxes via the configuration options.
        /// </summary>
        private void InitializeConfigurationOptions()
        {
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFC2x2));
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFC2x3));
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFC2x3CV2));
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFCCOBIE));
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFCBCA));
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFC4));

            foreach (IFCFileFormat fileType in Enum.GetValues(typeof(IFCFileFormat)))
            {
                IFCFileFormatAttributes item = new IFCFileFormatAttributes(fileType);
                comboboxFileType.Items.Add(item);
            }

            for (int level = 0; level <= 2; level++)
            {
                IFCSpaceBoundariesAttributes item = new IFCSpaceBoundariesAttributes(level);
                comboboxSpaceBoundaries.Items.Add(item);
            }

            PhaseArray phaseArray = IFCCommandOverrideApplication.TheDocument.Phases;

            comboboxActivePhase.Items.Add(new IFCPhaseAttributes(ElementId.InvalidElementId));  // Default.
            foreach (Phase phase in phaseArray)
            {
                comboboxActivePhase.Items.Add(new IFCPhaseAttributes(phase.Id));
            }
        }
        /// <summary>
        /// Updates the configuration IFCFileType when FileType changed in the combobox.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">Event arguments that contains the event data.</param>
        private void comboboxFileType_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            IFCFileFormatAttributes attributes    = (IFCFileFormatAttributes)comboboxFileType.SelectedItem;
            IFCExportConfiguration  configuration = GetSelectedConfiguration();

            if (configuration != null)
            {
                configuration.IFCFileType = attributes.FileType;
            }
        }
Example #4
0
        /// <summary>
        /// Initializes the comboboxes via the configuration options.
        /// </summary>
        private void InitializeConfigurationOptions()
        {
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFC2x2));
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFC2x3));
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFC2x3CV2));
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFCCOBIE));
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFCBCA));
            // TODO - how to handle IFC4?

            foreach (IFCFileFormat fileType in Enum.GetValues(typeof(IFCFileFormat)))
            {
                IFCFileFormatAttributes item = new IFCFileFormatAttributes(fileType);
                comboboxFileType.Items.Add(item);
            }

            for (int level = 0; level <= 2; level++)
            {
                IFCSpaceBoundariesAttributes item = new IFCSpaceBoundariesAttributes(level);
                comboboxSpaceBoundaries.Items.Add(item);
            }
        }
        /// <summary>
        /// Initializes the comboboxes via the configuration options.
        /// </summary>
        private void InitializeConfigurationOptions()
        {
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFC2x2));
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFC2x3));
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFC2x3CV2));
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFCCOBIE));
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFCBCA));
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFC2x3BFM));
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFC2x3FM));
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFC4RV));
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFC4DTV));


            foreach (IFCFileFormat fileType in Enum.GetValues(typeof(IFCFileFormat)))
            {
                IFCFileFormatAttributes item = new IFCFileFormatAttributes(fileType);
                comboboxFileType.Items.Add(item);
            }


            for (int level = 0; level <= 2; level++)
            {
                IFCSpaceBoundariesAttributes item = new IFCSpaceBoundariesAttributes(level);
                comboboxSpaceBoundaries.Items.Add(item);
            }

            PhaseArray phaseArray = IFCCommandOverrideApplication.TheDocument.Phases;

            comboboxActivePhase.Items.Add(new IFCPhaseAttributes(ElementId.InvalidElementId)); // Default.
            foreach (Phase phase in phaseArray)
            {
                comboboxActivePhase.Items.Add(new IFCPhaseAttributes(phase.Id));
            }

            // Initialize level of detail combo box
            comboBoxLOD.Items.Add(Properties.Resources.DetailLevelExtraLow);
            comboBoxLOD.Items.Add(Properties.Resources.DetailLevelLow);
            comboBoxLOD.Items.Add(Properties.Resources.DetailLevelMedium);
            comboBoxLOD.Items.Add(Properties.Resources.DetailLevelHigh);
        }
        /// <summary>
        /// Initializes the comboboxes via the configuration options.
        /// </summary>
        private void InitializeConfigurationOptions()
        {
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFC2x2));
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFC2x3));
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFC2x3CV2));
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFCCOBIE));
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFCBCA));
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFC4));
            
            foreach (IFCFileFormat fileType in Enum.GetValues(typeof(IFCFileFormat)))
            {
                IFCFileFormatAttributes item = new IFCFileFormatAttributes(fileType);
                comboboxFileType.Items.Add(item);
            }

            for (int level = 0; level <= 2; level++)
            {
                IFCSpaceBoundariesAttributes item = new IFCSpaceBoundariesAttributes(level);
                comboboxSpaceBoundaries.Items.Add(item);
            }

            PhaseArray phaseArray = IFCCommandOverrideApplication.TheDocument.Phases;
            comboboxActivePhase.Items.Add(new IFCPhaseAttributes(ElementId.InvalidElementId));  // Default.
            foreach (Phase phase in phaseArray)
            {
                comboboxActivePhase.Items.Add(new IFCPhaseAttributes(phase.Id));
            }
        }
 /// <summary>
 /// Gets the file filters for save dialog.
 /// </summary>
 /// <returns>The file filter.</returns>
 public String GetFileFilter()
 {
     IFCExportConfiguration selectedConfig = GetSelectedConfiguration();
     IFCFileFormatAttributes selectedItem = new IFCFileFormatAttributes(selectedConfig.IFCFileType);
     return selectedItem.GetFileFilter();
 }
        /// <summary>
        /// Initializes the comboboxes via the configuration options.
        /// </summary>
        private void InitializeConfigurationOptions()
        {
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFC2x2));
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFC2x3));
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFC2x3CV2));
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFCCOBIE));
            comboboxIfcType.Items.Add(new IFCVersionAttributes(IFCVersion.IFCBCA));
            // TODO - how to handle IFC4?

            foreach (IFCFileFormat fileType in Enum.GetValues(typeof(IFCFileFormat)))
            {
                IFCFileFormatAttributes item = new IFCFileFormatAttributes(fileType);
                comboboxFileType.Items.Add(item);
            }

            for (int level = 0; level <= 2; level++)
            {
                IFCSpaceBoundariesAttributes item = new IFCSpaceBoundariesAttributes(level);
                comboboxSpaceBoundaries.Items.Add(item);
            }
        }