public NTR_Exporter_form(ExternalCommandData cData, string message)
        {
            InitializeComponent();
            _commandData = cData;
            _uiapp       = _commandData.Application;
            _uidoc       = _uiapp.ActiveUIDocument;
            _doc         = _uidoc.Document;
            _message     = message;

            //Init excel path
            _excelPath = mySettings.Default.excelPath;
            if (!string.IsNullOrEmpty(_excelPath))
            {
                iv.ExcelPath = _excelPath;
            }
            //textBox20.Text = _excelPath;

            //Init output path
            _outputDirectoryFilePath = mySettings.Default.textBox5OutputPath;
            if (!string.IsNullOrEmpty(_outputDirectoryFilePath))
            {
                iv.OutputDirectoryFilePath = mySettings.Default.textBox5OutputPath;
            }
            textBox5.Text = iv.OutputDirectoryFilePath;

            //Init Scope
            //Gather all physical piping systems and collect distinct abbreviations
            pipeLinesAbbreviations = MepUtils.GetDistinctPhysicalPipingSystemTypeNames(_doc);

            //Use the distinct abbreviations as data source for the comboBox
            comboBox2.DataSource = pipeLinesAbbreviations;

            iv.ExportAllOneFile       = mySettings.Default.radioButton1AllPipelines;
            iv.ExportAllSepFiles      = mySettings.Default.radioButton13AllPipelinesSeparate;
            iv.ExportSpecificPipeLine = mySettings.Default.radioButton2SpecificPipeline;
            iv.ExportSelection        = mySettings.Default.radioButton14ExportSelection;
            if (!iv.ExportSpecificPipeLine)
            {
                comboBox2.Visible = false;
                textBox4.Visible  = false;
            }

            //Init diameter limit
            iv.DiameterLimit = double.Parse(mySettings.Default.textBox22DiameterLimit);
        }
        public PCF_Exporter_form(ExternalCommandData cData, string message)
        {
            InitializeComponent();
            _commandData = cData;
            _uiapp       = _commandData.Application;
            _uidoc       = _uiapp.ActiveUIDocument;
            _doc         = _uidoc.Document;
            _message     = message;

            //Init excel path
            _excelPath = mySettings.Default.excelPath;
            //textBox20.Text = _excelPath;

            //Init Scope

            //Gather all physical piping systems and collect distinct abbreviations
            pipeLinesAbbreviations = MepUtils.GetDistinctPhysicalPipingSystemTypeNames(_doc);

            //Use the distinct abbreviations as data source for the comboBox
            comboBox2.DataSource = pipeLinesAbbreviations;

            iv.ExportAllOneFile       = mySettings.Default.radioButton1AllPipelines;
            iv.ExportAllSepFiles      = mySettings.Default.radioButton13AllPipelinesSeparate;
            iv.ExportSpecificPipeLine = mySettings.Default.radioButton2SpecificPipeline;
            iv.ExportSelection        = mySettings.Default.radioButton14ExportSelection;
            if (!iv.ExportSpecificPipeLine)
            {
                comboBox2.Visible = false;
                textBox4.Visible  = false;
            }

            //Init Bore
            iv.UNITS_BORE_MM   = mySettings.Default.radioButton3BoreMM;
            iv.UNITS_BORE_INCH = mySettings.Default.radioButton4BoreINCH;
            iv.UNITS_BORE      = iv.UNITS_BORE_MM ? "MM" : "INCH";

            //Init cooords
            iv.UNITS_CO_ORDS_MM   = mySettings.Default.radioButton5CoordsMm;
            iv.UNITS_CO_ORDS_INCH = mySettings.Default.radioButton6CoordsInch;
            iv.UNITS_CO_ORDS      = iv.UNITS_CO_ORDS_MM ? "MM" : "INCH";

            //Init weight
            iv.UNITS_WEIGHT_KGS = mySettings.Default.radioButton7WeightKgs;
            iv.UNITS_WEIGHT_LBS = mySettings.Default.radioButton8WeightLbs;
            iv.UNITS_WEIGHT     = iv.UNITS_WEIGHT_KGS ? "KGS" : "LBS";

            //Init weight-length
            iv.UNITS_WEIGHT_LENGTH_METER = mySettings.Default.radioButton9WeightLengthM;
            iv.UNITS_WEIGHT_LENGTH_FEET  = mySettings.Default.radioButton10WeightLengthF;
            iv.UNITS_WEIGHT_LENGTH       = iv.UNITS_WEIGHT_LENGTH_METER ? "METER" : "FEET";

            //Init output path
            iv.OutputDirectoryFilePath = mySettings.Default.textBox5OutputPath;
            textBox5.Text = iv.OutputDirectoryFilePath;

            //Init diameter limit
            iv.DiameterLimit = double.Parse(mySettings.Default.textBox22DiameterLimit);

            //Init write wall thickness
            iv.WriteWallThickness = mySettings.Default.radioButton12WallThkTrue;

            //Init export to section
            iv.ExportToPlant3DIso = mySettings.Default.checkBox1Checked;
            iv.ExportToCII        = mySettings.Default.checkBox2Checked;
        }