コード例 #1
0
        /// <summary>
        /// Initialize values
        /// </summary>
        void Initialize()
        {
            //Layers and properties:
            m_layersAndProperties     = new List <String>();
            m_enumLayersAndProperties = new List <Autodesk.Revit.DB.PropOverrideMode>();
            m_layersAndProperties.Add("Category properties BYLAYER, overrides BYENTITY");
            m_enumLayersAndProperties.Add(Autodesk.Revit.DB.PropOverrideMode.ByEntity);
            m_layersAndProperties.Add("All properties BYLAYER, no overrides");
            m_enumLayersAndProperties.Add(Autodesk.Revit.DB.PropOverrideMode.ByLayer);
            m_layersAndProperties.Add("All properties BYLAYER, new Layers for overrides");
            m_enumLayersAndProperties.Add(Autodesk.Revit.DB.PropOverrideMode.NewLayer);


            //Layer Settings:
            m_layerMapping     = new List <String>();
            m_enumLayerMapping = new List <String>();
            m_layerMapping.Add("AIA - American Institute of Architects standard");
            m_enumLayerMapping.Add("AIA");
            m_layerMapping.Add("ISO13567 - ISO standard 13567");
            m_enumLayerMapping.Add("ISO13567");
            m_layerMapping.Add("CP83 - Singapore standard 83");
            m_enumLayerMapping.Add("CP83");
            m_layerMapping.Add("BS1192 - British standard 1192");
            m_enumLayerMapping.Add("BS1192");

            //Linetype scaling:
            m_lineScaling     = new List <String>();
            m_enumLineScaling = new List <Autodesk.Revit.DB.LineScaling>();
            m_lineScaling.Add("Scaled Linetype definitions");
            m_enumLineScaling.Add(Autodesk.Revit.DB.LineScaling.ViewScale);
            m_lineScaling.Add("ModelSpace (PSLTSCALE = 0)");
            m_enumLineScaling.Add(Autodesk.Revit.DB.LineScaling.ModelSpace);
            m_lineScaling.Add("Paperspace (PSLTSCALE = 1)");
            m_enumLineScaling.Add(Autodesk.Revit.DB.LineScaling.PaperSpace);

            //Coordinate system basis
            m_coorSystem     = new List <String>();
            m_enumCoorSystem = new List <bool>();
            m_coorSystem.Add("Project Internal");
            m_enumCoorSystem.Add(false);
            m_coorSystem.Add("Shared");
            m_enumCoorSystem.Add(true);

            //One DWG unit
            m_units     = new List <String>();
            m_enumUnits = new List <Autodesk.Revit.DB.ExportUnit>();
            m_units.Add(Autodesk.Revit.DB.ExportUnit.Foot.ToString().ToLower());
            m_enumUnits.Add(Autodesk.Revit.DB.ExportUnit.Foot);
            m_units.Add(Autodesk.Revit.DB.ExportUnit.Inch.ToString().ToLower());
            m_enumUnits.Add(Autodesk.Revit.DB.ExportUnit.Inch);
            m_units.Add(Autodesk.Revit.DB.ExportUnit.Meter.ToString().ToLower());
            m_enumUnits.Add(Autodesk.Revit.DB.ExportUnit.Meter);
            m_units.Add(Autodesk.Revit.DB.ExportUnit.Centimeter.ToString().ToLower());
            m_enumUnits.Add(Autodesk.Revit.DB.ExportUnit.Centimeter);
            m_units.Add(Autodesk.Revit.DB.ExportUnit.Millimeter.ToString().ToLower());
            m_enumUnits.Add(Autodesk.Revit.DB.ExportUnit.Millimeter);

            m_solids     = new List <String>();
            m_enumSolids = new List <Autodesk.Revit.DB.SolidGeometry>();
            m_solids.Add("Export as polymesh");
            m_enumSolids.Add(Autodesk.Revit.DB.SolidGeometry.Polymesh);
            m_solids.Add("Export as ACIS solids");
            m_enumSolids.Add(Autodesk.Revit.DB.SolidGeometry.ACIS);

            // Set default values
            m_exportAreas               = false;
            m_exportSolid               = Autodesk.Revit.DB.SolidGeometry.Polymesh;
            m_exportLayerMapping        = "AIA";
            m_exportLayersAndProperties = Autodesk.Revit.DB.PropOverrideMode.ByEntity;
            m_exportLineScaling         = Autodesk.Revit.DB.LineScaling.PaperSpace;
            m_exportMergeFiles          = false;
            m_exportCoorSystem          = EnumCoorSystem[0];
            m_exportUnit = Autodesk.Revit.DB.ExportUnit.Inch;
        }
コード例 #2
0
        /// <summary>
        /// Initialize values
        /// </summary>
        void Initialize()
        {
            //Layers and properties:
            m_layersAndProperties = new List<String>();
            m_enumLayersAndProperties = new List<Autodesk.Revit.DB.PropOverrideMode>();
            m_layersAndProperties.Add("Category properties BYLAYER, overrides BYENTITY");
            m_enumLayersAndProperties.Add(Autodesk.Revit.DB.PropOverrideMode.ByEntity);
            m_layersAndProperties.Add("All properties BYLAYER, no overrides");
            m_enumLayersAndProperties.Add(Autodesk.Revit.DB.PropOverrideMode.ByLayer);
            m_layersAndProperties.Add("All properties BYLAYER, new Layers for overrides");
            m_enumLayersAndProperties.Add(Autodesk.Revit.DB.PropOverrideMode.NewLayer);

            //Layer Settings:
            m_layerMapping = new List<String>();
            m_enumLayerMapping = new List<String>();
            m_layerMapping.Add("AIA - American Institute of Architects standard");
            m_enumLayerMapping.Add("AIA");
            m_layerMapping.Add("ISO13567 - ISO standard 13567");
            m_enumLayerMapping.Add("ISO13567");
            m_layerMapping.Add("CP83 - Singapore standard 83");
            m_enumLayerMapping.Add("CP83");
            m_layerMapping.Add("BS1192 - British standard 1192");
            m_enumLayerMapping.Add("BS1192");

            //Linetype scaling:
            m_lineScaling = new List<String>();
            m_enumLineScaling = new List<Autodesk.Revit.DB.LineScaling>();
            m_lineScaling.Add("Scaled Linetype definitions");
            m_enumLineScaling.Add(Autodesk.Revit.DB.LineScaling.ViewScale);
            m_lineScaling.Add("ModelSpace (PSLTSCALE = 0)");
            m_enumLineScaling.Add(Autodesk.Revit.DB.LineScaling.ModelSpace);
            m_lineScaling.Add("Paperspace (PSLTSCALE = 1)");
            m_enumLineScaling.Add(Autodesk.Revit.DB.LineScaling.PaperSpace);

            //Coordinate system basis
            m_coorSystem = new List<String>();
            m_enumCoorSystem = new List<bool>();
            m_coorSystem.Add("Project Internal");
            m_enumCoorSystem.Add(false);
            m_coorSystem.Add("Shared");
            m_enumCoorSystem.Add(true);

            //One DWG unit
            m_units = new List<String>();
            m_enumUnits = new List<Autodesk.Revit.DB.ExportUnit>();
            m_units.Add(Autodesk.Revit.DB.ExportUnit.Foot.ToString().ToLower());
            m_enumUnits.Add(Autodesk.Revit.DB.ExportUnit.Foot);
            m_units.Add(Autodesk.Revit.DB.ExportUnit.Inch.ToString().ToLower());
            m_enumUnits.Add(Autodesk.Revit.DB.ExportUnit.Inch);
            m_units.Add(Autodesk.Revit.DB.ExportUnit.Meter.ToString().ToLower());
            m_enumUnits.Add(Autodesk.Revit.DB.ExportUnit.Meter);
            m_units.Add(Autodesk.Revit.DB.ExportUnit.Centimeter.ToString().ToLower());
            m_enumUnits.Add(Autodesk.Revit.DB.ExportUnit.Centimeter);
            m_units.Add(Autodesk.Revit.DB.ExportUnit.Millimeter.ToString().ToLower());
            m_enumUnits.Add(Autodesk.Revit.DB.ExportUnit.Millimeter);

            m_solids = new List<String>();
            m_enumSolids = new List<Autodesk.Revit.DB.SolidGeometry>();
            m_solids.Add("Export as polymesh");
            m_enumSolids.Add(Autodesk.Revit.DB.SolidGeometry.Polymesh);
            m_solids.Add("Export as ACIS solids");
            m_enumSolids.Add(Autodesk.Revit.DB.SolidGeometry.ACIS);

            // Set default values
            m_exportAreas = false;
            m_exportSolid = Autodesk.Revit.DB.SolidGeometry.Polymesh;
            m_exportLayerMapping = "AIA";
            m_exportLayersAndProperties = Autodesk.Revit.DB.PropOverrideMode.ByEntity;
            m_exportLineScaling = Autodesk.Revit.DB.LineScaling.PaperSpace;
            m_exportMergeFiles = false;
            m_exportCoorSystem = EnumCoorSystem[0];
            m_exportUnit = Autodesk.Revit.DB.ExportUnit.Inch;
        }