mirror of
https://github.com/jeremytammik/RevitSdkSamples.git
synced 2026-08-30 16:42:51 +00:00
added Revit 2022 SDK minus except *rvt and *rfa
This commit is contained in:
@@ -0,0 +1,89 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// To add an external command to Autodesk Revit
|
||||
/// the developer should implement an object that
|
||||
/// supports the IExternalCommand interface.
|
||||
/// </summary>
|
||||
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
|
||||
[Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)]
|
||||
[Autodesk.Revit.Attributes.Journaling(Autodesk.Revit.Attributes.JournalingMode.NoCommandData)]
|
||||
public class Command : IExternalCommand
|
||||
{
|
||||
/// <summary>
|
||||
/// Implement this method as an external command for Revit.
|
||||
/// </summary>
|
||||
/// <param name="commandData">An object that is passed to the external application
|
||||
/// which contains data related to the command,
|
||||
/// such as the application object and active view.</param>
|
||||
/// <param name="message">A message that can be set by the external application
|
||||
/// which will be displayed if a failure or cancellation is returned by
|
||||
/// the external command.</param>
|
||||
/// <param name="elements">A set of elements to which the external application
|
||||
/// can add elements that are to be highlighted in case of failure or cancellation.</param>
|
||||
/// <returns>Return the status of the external command.
|
||||
/// A result of Succeeded means that the API external method functioned as expected.
|
||||
/// Cancelled can be used to signify that the user cancelled the external operation
|
||||
/// at some point. Failure should be returned if the application is unable to proceed with
|
||||
/// the operation.</returns>
|
||||
public Autodesk.Revit.UI.Result Execute(ExternalCommandData commandData,
|
||||
ref string message, Autodesk.Revit.DB.ElementSet elements)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Verify active document
|
||||
if (null == commandData.Application.ActiveUIDocument.Document)
|
||||
{
|
||||
message = "Active view is null.";
|
||||
return Autodesk.Revit.UI.Result.Failed;
|
||||
}
|
||||
|
||||
MainData mainData = new MainData(commandData);
|
||||
// Show the dialog
|
||||
using (MainForm mainForm = new MainForm(mainData))
|
||||
{
|
||||
if (mainForm.ShowDialog() == DialogResult.Cancel)
|
||||
{
|
||||
return Autodesk.Revit.UI.Result.Cancelled;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
message = ex.ToString();
|
||||
return Autodesk.Revit.UI.Result.Failed;
|
||||
}
|
||||
|
||||
return Autodesk.Revit.UI.Result.Succeeded;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,480 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
using Autodesk.Revit;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Data class which stores lower priority information for exporting dwg or dxf format
|
||||
/// </summary>
|
||||
public class ExportBaseOptionsData
|
||||
{
|
||||
#region Class Member Variables
|
||||
/// <summary>
|
||||
/// String list of Layers and properties used in UI
|
||||
/// </summary>
|
||||
List<String> m_layersAndProperties;
|
||||
|
||||
/// <summary>
|
||||
/// List of Autodesk.Revit.DB.PropOverrideMode
|
||||
/// </summary>
|
||||
List<Autodesk.Revit.DB.PropOverrideMode> m_enumLayersAndProperties;
|
||||
|
||||
/// <summary>
|
||||
/// String list of Layer Settings used in UI
|
||||
/// </summary>
|
||||
List<String> m_layerMapping;
|
||||
|
||||
/// <summary>
|
||||
/// String list of layer settings values defined in Revit
|
||||
/// </summary>
|
||||
List<String> m_enumLayerMapping;
|
||||
|
||||
/// <summary>
|
||||
/// Layer setting option to export
|
||||
/// </summary>
|
||||
String m_exportLayerMapping;
|
||||
|
||||
/// <summary>
|
||||
/// String list of Linetype scaling used in UI
|
||||
/// </summary>
|
||||
List<String> m_lineScaling;
|
||||
|
||||
/// <summary>
|
||||
/// PropOverrideMode Option to export
|
||||
/// </summary>
|
||||
Autodesk.Revit.DB.PropOverrideMode m_exportLayersAndProperties;
|
||||
|
||||
/// <summary>
|
||||
/// List of Autodesk.Revit.DB.LineScaling defined in Revit
|
||||
/// </summary>
|
||||
List<Autodesk.Revit.DB.LineScaling> m_enumLineScaling;
|
||||
|
||||
/// <summary>
|
||||
/// Line scaling option to export
|
||||
/// </summary>
|
||||
Autodesk.Revit.DB.LineScaling m_exportLineScaling;
|
||||
|
||||
/// <summary>
|
||||
/// String list of Coordinate system basis
|
||||
/// </summary>
|
||||
List<String> m_coorSystem;
|
||||
|
||||
/// <summary>
|
||||
/// List of values whether to use shared coordinate system
|
||||
/// </summary>
|
||||
List<bool> m_enumCoorSystem;
|
||||
|
||||
/// <summary>
|
||||
/// Coordinate system basis option to export
|
||||
/// </summary>
|
||||
bool m_exportCoorSystem;
|
||||
|
||||
/// <summary>
|
||||
/// String list of DWG or DXF unit
|
||||
/// </summary>
|
||||
List<String> m_units;
|
||||
|
||||
/// <summary>
|
||||
/// List of Autodesk.Revit.DB.ExportUnit values defined in Revit
|
||||
/// </summary>
|
||||
List<Autodesk.Revit.DB.ExportUnit> m_enumUnits;
|
||||
|
||||
/// <summary>
|
||||
/// Export unit option to export
|
||||
/// </summary>
|
||||
Autodesk.Revit.DB.ExportUnit m_exportUnit;
|
||||
|
||||
/// <summary>
|
||||
/// String list of solid used in UI
|
||||
/// </summary>
|
||||
List<String> m_solids;
|
||||
|
||||
/// <summary>
|
||||
/// List of Autodesk.Revit.DB.SolidGeometry defined in Revit
|
||||
/// </summary>
|
||||
List<Autodesk.Revit.DB.SolidGeometry> m_enumSolids;
|
||||
|
||||
/// <summary>
|
||||
/// Solid geometry option to export
|
||||
/// </summary>
|
||||
Autodesk.Revit.DB.SolidGeometry m_exportSolid;
|
||||
|
||||
/// <summary>
|
||||
/// Whether to create separate files for each view/sheet
|
||||
/// </summary>
|
||||
bool m_exportMergeFiles;
|
||||
|
||||
//Export rooms and areas as polylines
|
||||
bool m_exportAreas;
|
||||
#endregion
|
||||
|
||||
#region Class Properties
|
||||
/// <summary>
|
||||
/// String collection of Layers and properties used in UI
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<String> LayersAndProperties
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<String>(m_layersAndProperties);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Collection of Autodesk.Revit.DB.PropOverrideMode
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<Autodesk.Revit.DB.PropOverrideMode> EnumLayersAndProperties
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<Autodesk.Revit.DB.PropOverrideMode>(m_enumLayersAndProperties);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// PropOverrideMode Option to export
|
||||
/// </summary>
|
||||
public Autodesk.Revit.DB.PropOverrideMode ExportLayersAndProperties
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportLayersAndProperties;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_exportLayersAndProperties = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// String collection of Layer Settings used in UI
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<String> LayerMapping
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<String>(m_layerMapping);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// String collection of layer settings values defined in Revit
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<String> EnumLayerMapping
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<String>(m_enumLayerMapping);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Layer setting option to export
|
||||
/// </summary>
|
||||
public String ExportLayerMapping
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportLayerMapping;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_exportLayerMapping = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// String collection of Linetype scaling used in UI
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<String> LineScaling
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<String>(m_lineScaling);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Collection of Autodesk.Revit.DB.LineScaling defined in Revit
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<Autodesk.Revit.DB.LineScaling> EnumLineScaling
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<Autodesk.Revit.DB.LineScaling>(m_enumLineScaling);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Line scaling option to export
|
||||
/// </summary>
|
||||
public Autodesk.Revit.DB.LineScaling ExportLineScaling
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportLineScaling;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_exportLineScaling = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// String collection of Coordinate system basis
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<String> CoorSystem
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<String>(m_coorSystem);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Collection of values whether to use shared coordinate system
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<bool> EnumCoorSystem
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<bool>(m_enumCoorSystem);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Coordinate system basis option to export
|
||||
/// </summary>
|
||||
public bool ExportCoorSystem
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportCoorSystem;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_exportCoorSystem = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// String collection of DWG unit
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<String> Units
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<String>(m_units);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Collection of Autodesk.Revit.DB.ExportUnit values defined in Revit
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<Autodesk.Revit.DB.ExportUnit> EnumUnits
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<Autodesk.Revit.DB.ExportUnit>(m_enumUnits);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Export unit option to export
|
||||
/// </summary>
|
||||
public Autodesk.Revit.DB.ExportUnit ExportUnit
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportUnit;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_exportUnit = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// String collection of solid used in UI
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<String> Solids
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<String>(m_solids);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Collection of Autodesk.Revit.DB.SolidGeometry defined in Revit
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<Autodesk.Revit.DB.SolidGeometry> EnumSolids
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<Autodesk.Revit.DB.SolidGeometry>(m_enumSolids);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Property of solid geometry option to export
|
||||
/// </summary>
|
||||
public Autodesk.Revit.DB.SolidGeometry ExportSolid
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportSolid;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_exportSolid = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Export rooms and areas as polylines
|
||||
/// </summary>
|
||||
public bool ExportAreas
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportAreas;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_exportAreas = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether to create separate files for each view/sheet
|
||||
/// </summary>
|
||||
public bool ExportMergeFiles
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportMergeFiles;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_exportMergeFiles = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region Class Member Methods
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public ExportBaseOptionsData()
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
/// <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;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,276 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Provide a dialog which provides the options of lower priority information for export
|
||||
/// </summary>
|
||||
partial class ExportBaseOptionsForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.labelLayersAndProperties = new System.Windows.Forms.Label();
|
||||
this.comboBoxLayersAndProperties = new System.Windows.Forms.ComboBox();
|
||||
this.labelLinetypeScaling = new System.Windows.Forms.Label();
|
||||
this.comboBoxLinetypeScaling = new System.Windows.Forms.ComboBox();
|
||||
this.labelCoorSystem = new System.Windows.Forms.Label();
|
||||
this.comboBoxCoorSystem = new System.Windows.Forms.ComboBox();
|
||||
this.labelDWGUnit = new System.Windows.Forms.Label();
|
||||
this.comboBoxDWGUnit = new System.Windows.Forms.ComboBox();
|
||||
this.labelSolids = new System.Windows.Forms.Label();
|
||||
this.comboBoxSolids = new System.Windows.Forms.ComboBox();
|
||||
this.checkBoxExportingAreas = new System.Windows.Forms.CheckBox();
|
||||
this.buttonOK = new System.Windows.Forms.Button();
|
||||
this.labelLayerSettings = new System.Windows.Forms.Label();
|
||||
this.comboBoxLayerSettings = new System.Windows.Forms.ComboBox();
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.checkBoxMergeViews = new System.Windows.Forms.CheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// labelLayersAndProperties
|
||||
//
|
||||
this.labelLayersAndProperties.AutoSize = true;
|
||||
this.labelLayersAndProperties.Location = new System.Drawing.Point(13, 13);
|
||||
this.labelLayersAndProperties.Name = "labelLayersAndProperties";
|
||||
this.labelLayersAndProperties.Size = new System.Drawing.Size(111, 13);
|
||||
this.labelLayersAndProperties.TabIndex = 0;
|
||||
this.labelLayersAndProperties.Text = "Layers and properties:";
|
||||
//
|
||||
// comboBoxLayersAndProperties
|
||||
//
|
||||
this.comboBoxLayersAndProperties.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBoxLayersAndProperties.FormattingEnabled = true;
|
||||
this.comboBoxLayersAndProperties.Location = new System.Drawing.Point(16, 30);
|
||||
this.comboBoxLayersAndProperties.Name = "comboBoxLayersAndProperties";
|
||||
this.comboBoxLayersAndProperties.Size = new System.Drawing.Size(301, 21);
|
||||
this.comboBoxLayersAndProperties.TabIndex = 1;
|
||||
//
|
||||
// labelLinetypeScaling
|
||||
//
|
||||
this.labelLinetypeScaling.AutoSize = true;
|
||||
this.labelLinetypeScaling.Location = new System.Drawing.Point(13, 96);
|
||||
this.labelLinetypeScaling.Name = "labelLinetypeScaling";
|
||||
this.labelLinetypeScaling.Size = new System.Drawing.Size(86, 13);
|
||||
this.labelLinetypeScaling.TabIndex = 0;
|
||||
this.labelLinetypeScaling.Text = "Linetype scaling:";
|
||||
//
|
||||
// comboBoxLinetypeScaling
|
||||
//
|
||||
this.comboBoxLinetypeScaling.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBoxLinetypeScaling.FormattingEnabled = true;
|
||||
this.comboBoxLinetypeScaling.Location = new System.Drawing.Point(16, 113);
|
||||
this.comboBoxLinetypeScaling.Name = "comboBoxLinetypeScaling";
|
||||
this.comboBoxLinetypeScaling.Size = new System.Drawing.Size(301, 21);
|
||||
this.comboBoxLinetypeScaling.TabIndex = 3;
|
||||
//
|
||||
// labelCoorSystem
|
||||
//
|
||||
this.labelCoorSystem.AutoSize = true;
|
||||
this.labelCoorSystem.Location = new System.Drawing.Point(13, 142);
|
||||
this.labelCoorSystem.Name = "labelCoorSystem";
|
||||
this.labelCoorSystem.Size = new System.Drawing.Size(123, 13);
|
||||
this.labelCoorSystem.TabIndex = 0;
|
||||
this.labelCoorSystem.Text = "Coordinate system basis:";
|
||||
//
|
||||
// comboBoxCoorSystem
|
||||
//
|
||||
this.comboBoxCoorSystem.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBoxCoorSystem.FormattingEnabled = true;
|
||||
this.comboBoxCoorSystem.Location = new System.Drawing.Point(16, 157);
|
||||
this.comboBoxCoorSystem.Name = "comboBoxCoorSystem";
|
||||
this.comboBoxCoorSystem.Size = new System.Drawing.Size(301, 21);
|
||||
this.comboBoxCoorSystem.TabIndex = 4;
|
||||
//
|
||||
// labelDWGUnit
|
||||
//
|
||||
this.labelDWGUnit.AutoSize = true;
|
||||
this.labelDWGUnit.Location = new System.Drawing.Point(13, 184);
|
||||
this.labelDWGUnit.Name = "labelDWGUnit";
|
||||
this.labelDWGUnit.Size = new System.Drawing.Size(90, 13);
|
||||
this.labelDWGUnit.TabIndex = 0;
|
||||
this.labelDWGUnit.Text = "One DWG unit is:";
|
||||
//
|
||||
// comboBoxDWGUnit
|
||||
//
|
||||
this.comboBoxDWGUnit.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBoxDWGUnit.FormattingEnabled = true;
|
||||
this.comboBoxDWGUnit.Location = new System.Drawing.Point(16, 198);
|
||||
this.comboBoxDWGUnit.Name = "comboBoxDWGUnit";
|
||||
this.comboBoxDWGUnit.Size = new System.Drawing.Size(301, 21);
|
||||
this.comboBoxDWGUnit.TabIndex = 5;
|
||||
//
|
||||
// labelSolids
|
||||
//
|
||||
this.labelSolids.AutoSize = true;
|
||||
this.labelSolids.Location = new System.Drawing.Point(13, 224);
|
||||
this.labelSolids.Name = "labelSolids";
|
||||
this.labelSolids.Size = new System.Drawing.Size(113, 13);
|
||||
this.labelSolids.TabIndex = 0;
|
||||
this.labelSolids.Text = "Solids (3D views only):";
|
||||
//
|
||||
// comboBoxSolids
|
||||
//
|
||||
this.comboBoxSolids.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBoxSolids.FormattingEnabled = true;
|
||||
this.comboBoxSolids.Location = new System.Drawing.Point(16, 241);
|
||||
this.comboBoxSolids.Name = "comboBoxSolids";
|
||||
this.comboBoxSolids.Size = new System.Drawing.Size(301, 21);
|
||||
this.comboBoxSolids.TabIndex = 6;
|
||||
//
|
||||
// checkBoxExportingAreas
|
||||
//
|
||||
this.checkBoxExportingAreas.AutoSize = true;
|
||||
this.checkBoxExportingAreas.Location = new System.Drawing.Point(16, 271);
|
||||
this.checkBoxExportingAreas.Name = "checkBoxExportingAreas";
|
||||
this.checkBoxExportingAreas.Size = new System.Drawing.Size(194, 17);
|
||||
this.checkBoxExportingAreas.TabIndex = 7;
|
||||
this.checkBoxExportingAreas.Text = "Export rooms and areas as polylines";
|
||||
this.checkBoxExportingAreas.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// buttonOK
|
||||
//
|
||||
this.buttonOK.Location = new System.Drawing.Point(161, 335);
|
||||
this.buttonOK.Name = "buttonOK";
|
||||
this.buttonOK.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonOK.TabIndex = 0;
|
||||
this.buttonOK.Text = "&OK";
|
||||
this.buttonOK.UseVisualStyleBackColor = true;
|
||||
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
|
||||
//
|
||||
// labelLayerSettings
|
||||
//
|
||||
this.labelLayerSettings.AutoSize = true;
|
||||
this.labelLayerSettings.Location = new System.Drawing.Point(13, 55);
|
||||
this.labelLayerSettings.Name = "labelLayerSettings";
|
||||
this.labelLayerSettings.Size = new System.Drawing.Size(75, 13);
|
||||
this.labelLayerSettings.TabIndex = 0;
|
||||
this.labelLayerSettings.Text = "Layer settings:";
|
||||
//
|
||||
// comboBoxLayerSettings
|
||||
//
|
||||
this.comboBoxLayerSettings.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBoxLayerSettings.FormattingEnabled = true;
|
||||
this.comboBoxLayerSettings.Location = new System.Drawing.Point(16, 72);
|
||||
this.comboBoxLayerSettings.Name = "comboBoxLayerSettings";
|
||||
this.comboBoxLayerSettings.Size = new System.Drawing.Size(301, 21);
|
||||
this.comboBoxLayerSettings.TabIndex = 2;
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.buttonCancel.Location = new System.Drawing.Point(242, 335);
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonCancel.TabIndex = 8;
|
||||
this.buttonCancel.Text = "&Cancel";
|
||||
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxMergeViews
|
||||
//
|
||||
this.checkBoxMergeViews.AutoSize = true;
|
||||
this.checkBoxMergeViews.Location = new System.Drawing.Point(16, 294);
|
||||
this.checkBoxMergeViews.Name = "checkBoxMergeViews";
|
||||
this.checkBoxMergeViews.Size = new System.Drawing.Size(220, 17);
|
||||
this.checkBoxMergeViews.TabIndex = 9;
|
||||
this.checkBoxMergeViews.Text = "Create separate files for each view/sheet";
|
||||
this.checkBoxMergeViews.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// ExportBaseOptionsForm
|
||||
//
|
||||
this.AcceptButton = this.buttonOK;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.buttonCancel;
|
||||
this.ClientSize = new System.Drawing.Size(336, 368);
|
||||
this.Controls.Add(this.checkBoxMergeViews);
|
||||
this.Controls.Add(this.buttonCancel);
|
||||
this.Controls.Add(this.buttonOK);
|
||||
this.Controls.Add(this.checkBoxExportingAreas);
|
||||
this.Controls.Add(this.comboBoxSolids);
|
||||
this.Controls.Add(this.labelSolids);
|
||||
this.Controls.Add(this.comboBoxDWGUnit);
|
||||
this.Controls.Add(this.labelDWGUnit);
|
||||
this.Controls.Add(this.comboBoxCoorSystem);
|
||||
this.Controls.Add(this.labelCoorSystem);
|
||||
this.Controls.Add(this.comboBoxLinetypeScaling);
|
||||
this.Controls.Add(this.labelLinetypeScaling);
|
||||
this.Controls.Add(this.comboBoxLayerSettings);
|
||||
this.Controls.Add(this.labelLayerSettings);
|
||||
this.Controls.Add(this.comboBoxLayersAndProperties);
|
||||
this.Controls.Add(this.labelLayersAndProperties);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "ExportBaseOptionsForm";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label labelLayersAndProperties;
|
||||
private System.Windows.Forms.ComboBox comboBoxLayersAndProperties;
|
||||
private System.Windows.Forms.Label labelLinetypeScaling;
|
||||
private System.Windows.Forms.ComboBox comboBoxLinetypeScaling;
|
||||
private System.Windows.Forms.Label labelCoorSystem;
|
||||
private System.Windows.Forms.ComboBox comboBoxCoorSystem;
|
||||
private System.Windows.Forms.Label labelDWGUnit;
|
||||
private System.Windows.Forms.ComboBox comboBoxDWGUnit;
|
||||
private System.Windows.Forms.Label labelSolids;
|
||||
private System.Windows.Forms.ComboBox comboBoxSolids;
|
||||
private System.Windows.Forms.CheckBox checkBoxExportingAreas;
|
||||
private System.Windows.Forms.Button buttonOK;
|
||||
private System.Windows.Forms.Label labelLayerSettings;
|
||||
private System.Windows.Forms.ComboBox comboBoxLayerSettings;
|
||||
private System.Windows.Forms.Button buttonCancel;
|
||||
private System.Windows.Forms.CheckBox checkBoxMergeViews;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Provide a dialog which provides the options of lower priority information for exporting dwg format
|
||||
/// </summary>
|
||||
public partial class ExportBaseOptionsForm : System.Windows.Forms.Form
|
||||
{
|
||||
/// <summary>
|
||||
/// data class
|
||||
/// </summary>
|
||||
private ExportBaseOptionsData m_exportOptionsData;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Whether export the current view only
|
||||
/// </summary>
|
||||
private bool m_contain3DView;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="exportOptionsData">Data class object</param>
|
||||
/// <param name="contain3DView">If views to export contain 3D views</param>
|
||||
/// <param name="exportFormat">export format</param>
|
||||
public ExportBaseOptionsForm(ExportBaseOptionsData exportOptionsData, bool contain3DView, String exportFormat)
|
||||
{
|
||||
InitializeComponent();
|
||||
m_exportOptionsData = exportOptionsData;
|
||||
m_contain3DView = contain3DView;
|
||||
this.Text = "Export " + exportFormat + " Options";
|
||||
InitializeControl();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialize values and status of controls
|
||||
/// </summary>
|
||||
private void InitializeControl()
|
||||
{
|
||||
comboBoxLayersAndProperties.DataSource = m_exportOptionsData.LayersAndProperties;
|
||||
comboBoxLayersAndProperties.SelectedIndex = 0;
|
||||
comboBoxLayerSettings.DataSource = m_exportOptionsData.LayerMapping;
|
||||
comboBoxLayerSettings.SelectedIndex = 0;
|
||||
comboBoxLinetypeScaling.DataSource = m_exportOptionsData.LineScaling;
|
||||
comboBoxLinetypeScaling.SelectedIndex = 2;
|
||||
comboBoxCoorSystem.DataSource = m_exportOptionsData.CoorSystem;
|
||||
comboBoxCoorSystem.SelectedIndex = 0;
|
||||
comboBoxDWGUnit.DataSource = m_exportOptionsData.Units;
|
||||
comboBoxDWGUnit.SelectedIndex = 1;
|
||||
comboBoxSolids.DataSource = m_exportOptionsData.Solids;
|
||||
comboBoxSolids.SelectedIndex = 0;
|
||||
checkBoxMergeViews.Checked = m_exportOptionsData.ExportMergeFiles;
|
||||
checkBoxMergeViews.Text = "Merge all views in one file (via XRefs).";
|
||||
if (m_contain3DView)
|
||||
{
|
||||
comboBoxSolids.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
comboBoxSolids.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Transfer information back to ExportOptionData class
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void buttonOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
m_exportOptionsData.ExportLayersAndProperties =
|
||||
m_exportOptionsData.EnumLayersAndProperties[comboBoxLayersAndProperties.SelectedIndex];
|
||||
m_exportOptionsData.ExportLayerMapping =
|
||||
m_exportOptionsData.EnumLayerMapping[comboBoxLayerSettings.SelectedIndex];
|
||||
m_exportOptionsData.ExportLineScaling =
|
||||
m_exportOptionsData.EnumLineScaling[comboBoxLinetypeScaling.SelectedIndex];
|
||||
m_exportOptionsData.ExportCoorSystem =
|
||||
m_exportOptionsData.EnumCoorSystem[comboBoxCoorSystem.SelectedIndex];
|
||||
m_exportOptionsData.ExportUnit = m_exportOptionsData.EnumUnits[comboBoxDWGUnit.SelectedIndex];
|
||||
m_exportOptionsData.ExportSolid = m_exportOptionsData.EnumSolids[comboBoxSolids.SelectedIndex];
|
||||
m_exportOptionsData.ExportAreas = checkBoxExportingAreas.Checked;
|
||||
m_exportOptionsData.ExportMergeFiles = checkBoxMergeViews.Checked;
|
||||
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,278 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Reflection;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Data class which stores the main information for exporting dgn format
|
||||
/// </summary>
|
||||
public class ExportDGNData : ExportDataWithViews
|
||||
{
|
||||
#region Class Member Variables
|
||||
/// <summary>
|
||||
/// String list of Layer Settings used in UI
|
||||
/// </summary>
|
||||
List<String> m_layerMapping;
|
||||
/// <summary>
|
||||
/// String list of layer settings values defined in Revit
|
||||
/// </summary>
|
||||
List<String> m_enumLayerMapping;
|
||||
/// <summary>
|
||||
/// String list of exported format version defined in Revit
|
||||
/// </summary>
|
||||
List<String> m_exportFileVersions;
|
||||
|
||||
/// <summary>
|
||||
/// Layer setting option to export
|
||||
/// </summary>
|
||||
private String m_exportLayerMapping;
|
||||
/// <summary>
|
||||
/// Exported format version
|
||||
/// </summary>
|
||||
private String m_exportFileVersion;
|
||||
/// <summary>
|
||||
/// Whether to hide scope box
|
||||
/// </summary>
|
||||
private Boolean m_hideScopeBox;
|
||||
/// <summary>
|
||||
/// Whether to hide unreference view tags
|
||||
/// </summary>
|
||||
private Boolean m_hideUnreferenceViewTags;
|
||||
/// <summary>
|
||||
/// Whether to hide reference plane
|
||||
/// </summary>
|
||||
private Boolean m_hideReferencePlane;
|
||||
#endregion
|
||||
|
||||
#region Class Properties
|
||||
/// <summary>
|
||||
/// Layer setting option to export
|
||||
/// </summary>
|
||||
public String ExportLayerMapping
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportLayerMapping;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_exportLayerMapping = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether to hide scope box
|
||||
/// </summary>
|
||||
public Boolean HideScopeBox
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_hideScopeBox;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_hideScopeBox = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether to hide unreference view tags
|
||||
/// </summary>
|
||||
public Boolean HideUnreferenceViewTags
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_hideUnreferenceViewTags;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_hideUnreferenceViewTags = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether to hide reference plane
|
||||
/// </summary>
|
||||
public Boolean HideReferencePlane
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_hideReferencePlane;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_hideReferencePlane = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Exported format version
|
||||
/// </summary>
|
||||
public String ExportFileVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportFileVersion;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_exportFileVersion = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// String collection of Layer Settings used in UI
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<String> LayerMapping
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<String>(m_layerMapping);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// String list of exported format version defined in Revit
|
||||
/// </summary>
|
||||
public List<String> ExportFileVersions
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportFileVersions;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// String collection of layer settings values defined in Revit
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<String> EnumLayerMapping
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<String>(m_enumLayerMapping);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Class Member Methods
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="commandData">Revit command data</param>
|
||||
/// <param name="exportFormat">Format to export</param>
|
||||
public ExportDGNData(ExternalCommandData commandData, ExportFormat exportFormat)
|
||||
: base(commandData, exportFormat)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the variables
|
||||
/// </summary>
|
||||
private void Initialize()
|
||||
{
|
||||
//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");
|
||||
|
||||
//Export format:
|
||||
m_exportFileVersions = new List<string>();
|
||||
m_exportFileVersions.Add("MicroStation V8 Format");
|
||||
m_exportFileVersions.Add("MicroStation V7 Format");
|
||||
|
||||
m_filter = "Microstation DGN Files |*.dgn";
|
||||
m_title = "Export DGN";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Collect the parameters and export
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override bool Export()
|
||||
{
|
||||
base.Export();
|
||||
|
||||
bool exported = false;
|
||||
ICollection<ElementId> views = new List<ElementId>();
|
||||
if (m_currentViewOnly)
|
||||
{
|
||||
views.Add(m_activeDoc.ActiveView.Id);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (View view in m_selectViewsData.SelectedViews)
|
||||
{
|
||||
views.Add(view.Id);
|
||||
}
|
||||
}
|
||||
|
||||
//parameter : DWGExportOptions dwgExportOptions
|
||||
DGNExportOptions dgnExportOptions = new DGNExportOptions();
|
||||
// default values
|
||||
dgnExportOptions.FileVersion = DGNFileFormat.DGNVersion8;
|
||||
m_exportLayerMapping = m_enumLayerMapping[0];
|
||||
|
||||
// set values from selected options
|
||||
dgnExportOptions.LayerMapping = m_exportLayerMapping;
|
||||
if (m_exportFileVersion == "MicroStation V7 Format")
|
||||
{
|
||||
dgnExportOptions.FileVersion = DGNFileFormat.DGNVersion7;
|
||||
}
|
||||
else
|
||||
{
|
||||
dgnExportOptions.FileVersion = DGNFileFormat.DGNVersion8;
|
||||
}
|
||||
dgnExportOptions.HideScopeBox = m_hideScopeBox;
|
||||
dgnExportOptions.HideUnreferenceViewTags = m_hideUnreferenceViewTags;
|
||||
dgnExportOptions.HideReferencePlane = m_hideReferencePlane;
|
||||
ProcessModule mainModule = Process.GetCurrentProcess().MainModule;
|
||||
String RevitFolder = Path.GetDirectoryName( mainModule.FileName );
|
||||
dgnExportOptions.SeedName = Path.Combine(RevitFolder, @"ACADInterop\V8-Imperial-Seed3D.dgn");
|
||||
|
||||
//Export
|
||||
exported = m_activeDoc.Export(m_exportFolder, m_exportFileName, views, dgnExportOptions);
|
||||
return exported;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,276 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
partial class ExportDGNOptionsForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.labelLayerMapping = new System.Windows.Forms.Label();
|
||||
this.comboBoxLayerSettings = new System.Windows.Forms.ComboBox();
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.buttonOK = new System.Windows.Forms.Button();
|
||||
this.comboBoxExportFileFormat = new System.Windows.Forms.ComboBox();
|
||||
this.labelExportFormat = new System.Windows.Forms.Label();
|
||||
this.checkBoxHideScopeBoxes = new System.Windows.Forms.CheckBox();
|
||||
this.checkBoxHideReferencePlanes = new System.Windows.Forms.CheckBox();
|
||||
this.checkBoxHideUnrefereceViewTag = new System.Windows.Forms.CheckBox();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.textBox2DSeedFile = new System.Windows.Forms.TextBox();
|
||||
this.button2DSeedFile = new System.Windows.Forms.Button();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.textBox3DSeedFile = new System.Windows.Forms.TextBox();
|
||||
this.button3DSeedFile = new System.Windows.Forms.Button();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// labelLayerMapping
|
||||
//
|
||||
this.labelLayerMapping.AutoSize = true;
|
||||
this.labelLayerMapping.Location = new System.Drawing.Point(11, 15);
|
||||
this.labelLayerMapping.Name = "labelLayerMapping";
|
||||
this.labelLayerMapping.Size = new System.Drawing.Size(77, 13);
|
||||
this.labelLayerMapping.TabIndex = 14;
|
||||
this.labelLayerMapping.Text = "Layer Settings:";
|
||||
//
|
||||
// comboBoxLayerSettings
|
||||
//
|
||||
this.comboBoxLayerSettings.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBoxLayerSettings.FormattingEnabled = true;
|
||||
this.comboBoxLayerSettings.Location = new System.Drawing.Point(14, 31);
|
||||
this.comboBoxLayerSettings.Name = "comboBoxLayerSettings";
|
||||
this.comboBoxLayerSettings.Size = new System.Drawing.Size(419, 21);
|
||||
this.comboBoxLayerSettings.TabIndex = 15;
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.buttonCancel.Location = new System.Drawing.Point(358, 332);
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonCancel.TabIndex = 17;
|
||||
this.buttonCancel.Text = "&Cancel";
|
||||
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// buttonOK
|
||||
//
|
||||
this.buttonOK.Location = new System.Drawing.Point(275, 332);
|
||||
this.buttonOK.Name = "buttonOK";
|
||||
this.buttonOK.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonOK.TabIndex = 16;
|
||||
this.buttonOK.Text = "&OK";
|
||||
this.buttonOK.UseVisualStyleBackColor = true;
|
||||
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
|
||||
//
|
||||
// comboBoxExportFileFormat
|
||||
//
|
||||
this.comboBoxExportFileFormat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBoxExportFileFormat.FormattingEnabled = true;
|
||||
this.comboBoxExportFileFormat.Location = new System.Drawing.Point(17, 82);
|
||||
this.comboBoxExportFileFormat.Name = "comboBoxExportFileFormat";
|
||||
this.comboBoxExportFileFormat.Size = new System.Drawing.Size(416, 21);
|
||||
this.comboBoxExportFileFormat.TabIndex = 18;
|
||||
//
|
||||
// labelExportFormat
|
||||
//
|
||||
this.labelExportFormat.AutoSize = true;
|
||||
this.labelExportFormat.Location = new System.Drawing.Point(14, 64);
|
||||
this.labelExportFormat.Name = "labelExportFormat";
|
||||
this.labelExportFormat.Size = new System.Drawing.Size(100, 13);
|
||||
this.labelExportFormat.TabIndex = 19;
|
||||
this.labelExportFormat.Text = "Export to file format:";
|
||||
//
|
||||
// checkBoxHideScopeBoxes
|
||||
//
|
||||
this.checkBoxHideScopeBoxes.AutoSize = true;
|
||||
this.checkBoxHideScopeBoxes.Location = new System.Drawing.Point(17, 244);
|
||||
this.checkBoxHideScopeBoxes.Name = "checkBoxHideScopeBoxes";
|
||||
this.checkBoxHideScopeBoxes.Size = new System.Drawing.Size(111, 17);
|
||||
this.checkBoxHideScopeBoxes.TabIndex = 20;
|
||||
this.checkBoxHideScopeBoxes.Text = "Hide scope boxes";
|
||||
this.checkBoxHideScopeBoxes.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxHideReferencePlanes
|
||||
//
|
||||
this.checkBoxHideReferencePlanes.AutoSize = true;
|
||||
this.checkBoxHideReferencePlanes.Location = new System.Drawing.Point(17, 267);
|
||||
this.checkBoxHideReferencePlanes.Name = "checkBoxHideReferencePlanes";
|
||||
this.checkBoxHideReferencePlanes.Size = new System.Drawing.Size(130, 17);
|
||||
this.checkBoxHideReferencePlanes.TabIndex = 20;
|
||||
this.checkBoxHideReferencePlanes.Text = "Hide reference planes";
|
||||
this.checkBoxHideReferencePlanes.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxHideUnrefereceViewTag
|
||||
//
|
||||
this.checkBoxHideUnrefereceViewTag.AutoSize = true;
|
||||
this.checkBoxHideUnrefereceViewTag.Location = new System.Drawing.Point(17, 290);
|
||||
this.checkBoxHideUnrefereceViewTag.Name = "checkBoxHideUnrefereceViewTag";
|
||||
this.checkBoxHideUnrefereceViewTag.Size = new System.Drawing.Size(162, 17);
|
||||
this.checkBoxHideUnrefereceViewTag.TabIndex = 20;
|
||||
this.checkBoxHideUnrefereceViewTag.Text = "Hide unreferenced view tags";
|
||||
this.checkBoxHideUnrefereceViewTag.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.button3DSeedFile);
|
||||
this.groupBox1.Controls.Add(this.button2DSeedFile);
|
||||
this.groupBox1.Controls.Add(this.textBox3DSeedFile);
|
||||
this.groupBox1.Controls.Add(this.label2);
|
||||
this.groupBox1.Controls.Add(this.textBox2DSeedFile);
|
||||
this.groupBox1.Controls.Add(this.label1);
|
||||
this.groupBox1.Location = new System.Drawing.Point(14, 119);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(419, 116);
|
||||
this.groupBox1.TabIndex = 21;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Specify seed file for";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(7, 20);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(54, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "2D views:";
|
||||
//
|
||||
// textBox2DSeedFile
|
||||
//
|
||||
this.textBox2DSeedFile.Location = new System.Drawing.Point(10, 37);
|
||||
this.textBox2DSeedFile.Name = "textBox2DSeedFile";
|
||||
this.textBox2DSeedFile.Size = new System.Drawing.Size(371, 20);
|
||||
this.textBox2DSeedFile.TabIndex = 1;
|
||||
//
|
||||
// button2DSeedFile
|
||||
//
|
||||
this.button2DSeedFile.Location = new System.Drawing.Point(387, 36);
|
||||
this.button2DSeedFile.Name = "button2DSeedFile";
|
||||
this.button2DSeedFile.Size = new System.Drawing.Size(26, 20);
|
||||
this.button2DSeedFile.TabIndex = 2;
|
||||
this.button2DSeedFile.Text = "...";
|
||||
this.button2DSeedFile.UseVisualStyleBackColor = true;
|
||||
this.button2DSeedFile.Click += new System.EventHandler(this.button2DSeedFile_Click);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(7, 67);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(54, 13);
|
||||
this.label2.TabIndex = 0;
|
||||
this.label2.Text = "3D views:";
|
||||
//
|
||||
// textBox3DSeedFile
|
||||
//
|
||||
this.textBox3DSeedFile.Location = new System.Drawing.Point(10, 84);
|
||||
this.textBox3DSeedFile.Name = "textBox3DSeedFile";
|
||||
this.textBox3DSeedFile.Size = new System.Drawing.Size(371, 20);
|
||||
this.textBox3DSeedFile.TabIndex = 1;
|
||||
//
|
||||
// button3DSeedFile
|
||||
//
|
||||
this.button3DSeedFile.Location = new System.Drawing.Point(387, 83);
|
||||
this.button3DSeedFile.Name = "button3DSeedFile";
|
||||
this.button3DSeedFile.Size = new System.Drawing.Size(26, 20);
|
||||
this.button3DSeedFile.TabIndex = 2;
|
||||
this.button3DSeedFile.Text = "...";
|
||||
this.button3DSeedFile.UseVisualStyleBackColor = true;
|
||||
this.button3DSeedFile.Click += new System.EventHandler(this.button3DSeedFile_Click);
|
||||
//
|
||||
// ExportDGNOptionsForm
|
||||
//
|
||||
this.AcceptButton = this.buttonOK;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.buttonCancel;
|
||||
this.ClientSize = new System.Drawing.Size(448, 372);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Controls.Add(this.checkBoxHideUnrefereceViewTag);
|
||||
this.Controls.Add(this.checkBoxHideReferencePlanes);
|
||||
this.Controls.Add(this.checkBoxHideScopeBoxes);
|
||||
this.Controls.Add(this.labelExportFormat);
|
||||
this.Controls.Add(this.comboBoxExportFileFormat);
|
||||
this.Controls.Add(this.buttonCancel);
|
||||
this.Controls.Add(this.buttonOK);
|
||||
this.Controls.Add(this.comboBoxLayerSettings);
|
||||
this.Controls.Add(this.labelLayerMapping);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "ExportDGNOptionsForm";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Export DGN Options";
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label labelLayerMapping;
|
||||
private System.Windows.Forms.ComboBox comboBoxLayerSettings;
|
||||
private System.Windows.Forms.Button buttonCancel;
|
||||
private System.Windows.Forms.Button buttonOK;
|
||||
private System.Windows.Forms.ComboBox comboBoxExportFileFormat;
|
||||
private System.Windows.Forms.Label labelExportFormat;
|
||||
private System.Windows.Forms.CheckBox checkBoxHideScopeBoxes;
|
||||
private System.Windows.Forms.CheckBox checkBoxHideReferencePlanes;
|
||||
private System.Windows.Forms.CheckBox checkBoxHideUnrefereceViewTag;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.Button button3DSeedFile;
|
||||
private System.Windows.Forms.Button button2DSeedFile;
|
||||
private System.Windows.Forms.TextBox textBox3DSeedFile;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox textBox2DSeedFile;
|
||||
private System.Windows.Forms.Label label1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,175 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Diagnostics;
|
||||
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Provide a dialog which provides the options for exporting dgn format
|
||||
/// </summary>
|
||||
public partial class ExportDGNOptionsForm : System.Windows.Forms.Form
|
||||
{
|
||||
/// <summary>
|
||||
/// data class
|
||||
/// </summary>
|
||||
private ExportDGNData m_data;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="data">Data class object</param>
|
||||
public ExportDGNOptionsForm(ExportDGNData data)
|
||||
{
|
||||
m_data = data;
|
||||
InitializeComponent();
|
||||
InitializeControl();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialize values and status of controls
|
||||
/// </summary>
|
||||
private void InitializeControl()
|
||||
{
|
||||
comboBoxLayerSettings.DataSource = m_data.LayerMapping;
|
||||
comboBoxLayerSettings.SelectedIndex = 0;
|
||||
comboBoxExportFileFormat.DataSource = m_data.ExportFileVersions;
|
||||
comboBoxExportFileFormat.SelectedIndex = 0;
|
||||
checkBoxHideReferencePlanes.Checked = false;
|
||||
checkBoxHideScopeBoxes.Checked = false;
|
||||
checkBoxHideUnrefereceViewTag.Checked = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OK button click event
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void buttonOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (String.IsNullOrEmpty(textBox2DSeedFile.Text))
|
||||
{
|
||||
TaskDialog.Show("Specify 2D seed file", "Please specify the 2D seed file.", TaskDialogCommonButtons.Ok);
|
||||
button2DSeedFile.Focus();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!File.Exists(textBox2DSeedFile.Text))
|
||||
{
|
||||
TaskDialog.Show("Specify 2D seed file", "The 2D seed file does not exist.", TaskDialogCommonButtons.Ok);
|
||||
button2DSeedFile.Focus();
|
||||
return;
|
||||
}
|
||||
|
||||
if (String.IsNullOrEmpty(textBox3DSeedFile.Text))
|
||||
{
|
||||
TaskDialog.Show("Specify 3D seed file", "Please specify the 3D seed file.", TaskDialogCommonButtons.Ok);
|
||||
button3DSeedFile.Focus();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!File.Exists(textBox3DSeedFile.Text))
|
||||
{
|
||||
TaskDialog.Show("Specify 3D seed file", "The 3D seed file does not exist.", TaskDialogCommonButtons.Ok);
|
||||
button3DSeedFile.Focus();
|
||||
return;
|
||||
}
|
||||
|
||||
m_data.ExportLayerMapping =
|
||||
m_data.EnumLayerMapping[comboBoxLayerSettings.SelectedIndex];
|
||||
m_data.ExportFileVersion = m_data.ExportFileVersions[comboBoxExportFileFormat.SelectedIndex];
|
||||
m_data.HideScopeBox = checkBoxHideScopeBoxes.Checked;
|
||||
m_data.HideReferencePlane = checkBoxHideReferencePlanes.Checked;
|
||||
m_data.HideUnreferenceViewTags = checkBoxHideUnrefereceViewTag.Checked;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// button2DSeedFile click event
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void button2DSeedFile_Click(object sender, EventArgs e)
|
||||
{
|
||||
String fileName = String.Empty;
|
||||
DialogResult result = ShowOpenDialog(ref fileName);
|
||||
if (result != DialogResult.Cancel)
|
||||
{
|
||||
textBox2DSeedFile.Text = fileName;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Show open file dialog
|
||||
/// </summary>
|
||||
/// <param name="returnFileName"></param>
|
||||
/// <returns></returns>
|
||||
public static DialogResult ShowOpenDialog(ref String returnFileName)
|
||||
{
|
||||
ProcessModule mainModule = Process.GetCurrentProcess().MainModule;
|
||||
String folderRevit = Path.GetDirectoryName(mainModule.FileName);
|
||||
String folderACADInterop = Path.Combine(folderRevit, "ACADInterop");
|
||||
String initialDirectory = folderRevit;
|
||||
if (Directory.Exists(folderACADInterop))
|
||||
{
|
||||
initialDirectory = folderACADInterop;
|
||||
}
|
||||
|
||||
using (OpenFileDialog openFileDialog = new OpenFileDialog())
|
||||
{
|
||||
openFileDialog.Title = "Specify seed file";
|
||||
openFileDialog.InitialDirectory = initialDirectory;
|
||||
openFileDialog.Filter = "DGN Files |*.dgn";
|
||||
openFileDialog.RestoreDirectory = true;
|
||||
|
||||
DialogResult result = openFileDialog.ShowDialog();
|
||||
if (result != DialogResult.Cancel)
|
||||
{
|
||||
returnFileName = openFileDialog.FileName;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
private void button3DSeedFile_Click(object sender, EventArgs e)
|
||||
{
|
||||
String fileName = String.Empty;
|
||||
DialogResult result = ShowOpenDialog(ref fileName);
|
||||
if (result != DialogResult.Cancel)
|
||||
{
|
||||
textBox3DSeedFile.Text = fileName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,248 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Data class which stores the information for exporting 2D DWF format
|
||||
/// </summary>
|
||||
public class ExportDWFData : ExportDataWithViews
|
||||
{
|
||||
#region Class Member Variables
|
||||
/// <summary>
|
||||
/// Whether export object data
|
||||
/// </summary>
|
||||
private bool m_exportObjectData;
|
||||
/// <summary>
|
||||
/// Whether export areas
|
||||
/// </summary>
|
||||
private bool m_exportAreas;
|
||||
/// <summary>
|
||||
/// Whether to create separate files for each view/sheet
|
||||
/// </summary>
|
||||
private bool m_exportMergeFiles;
|
||||
/// <summary>
|
||||
/// List of image quality for DWF export
|
||||
/// </summary>
|
||||
List<Autodesk.Revit.DB.DWFImageQuality> m_ImageQualities;
|
||||
/// <summary>
|
||||
/// Selected image quality for DWF export
|
||||
/// </summary>
|
||||
Autodesk.Revit.DB.DWFImageQuality m_dwfImageQuality;
|
||||
/// <summary>
|
||||
/// Selected image format for DWF export
|
||||
/// </summary>
|
||||
Autodesk.Revit.DB.DWFImageFormat m_dwfImageFormat;
|
||||
#endregion
|
||||
|
||||
#region Class Properties
|
||||
/// <summary>
|
||||
/// Whether export object data
|
||||
/// </summary>
|
||||
public bool ExportObjectData
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportObjectData;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_exportObjectData = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether to create separate files for each view/sheet
|
||||
/// </summary>
|
||||
public bool ExportMergeFiles
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportMergeFiles;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_exportMergeFiles = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether export areas
|
||||
/// </summary>
|
||||
public bool ExportAreas
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportAreas;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_exportAreas = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Selected image format for DWF export
|
||||
/// </summary>
|
||||
public Autodesk.Revit.DB.DWFImageFormat DwfImageFormat
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_dwfImageFormat;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_dwfImageFormat = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Selected image quality for DWF export
|
||||
/// </summary>
|
||||
public Autodesk.Revit.DB.DWFImageQuality DwfImageQuality
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_dwfImageQuality;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_dwfImageQuality = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// List of image quality for DWF export
|
||||
/// </summary>
|
||||
public List<Autodesk.Revit.DB.DWFImageQuality> ImageQualities
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ImageQualities;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_ImageQualities = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Class Member Methods
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="commandData">Revit command data</param>
|
||||
/// <param name="exportFormat">Format to export</param>
|
||||
public ExportDWFData(ExternalCommandData commandData, ExportFormat exportFormat)
|
||||
: base(commandData, exportFormat)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the variables
|
||||
/// </summary>
|
||||
private void Initialize()
|
||||
{
|
||||
m_exportObjectData = true;
|
||||
m_exportAreas = false;
|
||||
m_exportMergeFiles = true;
|
||||
m_ImageQualities = new List<Autodesk.Revit.DB.DWFImageQuality>();
|
||||
m_ImageQualities.Add(Autodesk.Revit.DB.DWFImageQuality.Low);
|
||||
m_ImageQualities.Add(Autodesk.Revit.DB.DWFImageQuality.Medium);
|
||||
m_ImageQualities.Add(Autodesk.Revit.DB.DWFImageQuality.High);
|
||||
|
||||
// Export DWF
|
||||
if (m_exportFormat == ExportFormat.DWF)
|
||||
{
|
||||
m_filter = "DWF Files |*.dwf";
|
||||
m_title = "Export DWF";
|
||||
}
|
||||
// Export DWFx
|
||||
else
|
||||
{
|
||||
m_filter = "DWFx Files |*.dwfx";
|
||||
m_title = "Export DWFx";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Collect the parameters and export
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override bool Export()
|
||||
{
|
||||
Transaction transaction = new Transaction(m_activeDoc, "Export_To_DWF");
|
||||
transaction.Start();
|
||||
bool exported = false;
|
||||
base.Export();
|
||||
|
||||
//parameter : ViewSet views
|
||||
ViewSet views = new ViewSet();
|
||||
if (m_currentViewOnly)
|
||||
{
|
||||
views.Insert(m_activeDoc.ActiveView);
|
||||
}
|
||||
else
|
||||
{
|
||||
views = m_selectViewsData.SelectedViews;
|
||||
}
|
||||
|
||||
// Export DWFx
|
||||
if (m_exportFormat == ExportFormat.DWFx)
|
||||
{
|
||||
DWFXExportOptions options = new DWFXExportOptions();
|
||||
options.ExportObjectData = m_exportObjectData;
|
||||
options.ExportingAreas = m_exportAreas;
|
||||
options.MergedViews = m_exportMergeFiles;
|
||||
options.ImageFormat = m_dwfImageFormat;
|
||||
options.ImageQuality = m_dwfImageQuality;
|
||||
exported = m_activeDoc.Export(m_exportFolder, m_exportFileName, views, options);
|
||||
}
|
||||
// Export DWF
|
||||
else
|
||||
{
|
||||
DWFExportOptions options = new DWFExportOptions();
|
||||
options.ExportObjectData = m_exportObjectData;
|
||||
options.ExportingAreas = m_exportAreas;
|
||||
options.MergedViews = m_exportMergeFiles;
|
||||
options.ImageFormat = m_dwfImageFormat;
|
||||
options.ImageQuality = m_dwfImageQuality;
|
||||
exported = m_activeDoc.Export(m_exportFolder, m_exportFileName, views, options);
|
||||
}
|
||||
transaction.Commit();
|
||||
|
||||
return exported;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,232 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Provide a dialog which provides the options of lower priority information
|
||||
/// for export DWF format
|
||||
/// </summary>
|
||||
partial class ExportDWFOptionForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.checkBoxRoomsAndAreas = new System.Windows.Forms.CheckBox();
|
||||
this.checkBoxModelElements = new System.Windows.Forms.CheckBox();
|
||||
this.buttonOK = new System.Windows.Forms.Button();
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.checkBoxMergeViews = new System.Windows.Forms.CheckBox();
|
||||
this.groupBoxGraphicsSetting = new System.Windows.Forms.GroupBox();
|
||||
this.comboBoxImageQuality = new System.Windows.Forms.ComboBox();
|
||||
this.labelImageQuality = new System.Windows.Forms.Label();
|
||||
this.radioButtonCompressedFormat = new System.Windows.Forms.RadioButton();
|
||||
this.radioButtonStandardFormat = new System.Windows.Forms.RadioButton();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.groupBoxGraphicsSetting.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.checkBoxRoomsAndAreas);
|
||||
this.groupBox1.Controls.Add(this.checkBoxModelElements);
|
||||
this.groupBox1.Location = new System.Drawing.Point(13, 13);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(308, 68);
|
||||
this.groupBox1.TabIndex = 0;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Export Object Data";
|
||||
//
|
||||
// checkBoxRoomsAndAreas
|
||||
//
|
||||
this.checkBoxRoomsAndAreas.AutoSize = true;
|
||||
this.checkBoxRoomsAndAreas.Location = new System.Drawing.Point(10, 43);
|
||||
this.checkBoxRoomsAndAreas.Name = "checkBoxRoomsAndAreas";
|
||||
this.checkBoxRoomsAndAreas.Size = new System.Drawing.Size(110, 17);
|
||||
this.checkBoxRoomsAndAreas.TabIndex = 0;
|
||||
this.checkBoxRoomsAndAreas.Text = "Rooms and Areas";
|
||||
this.checkBoxRoomsAndAreas.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxModelElements
|
||||
//
|
||||
this.checkBoxModelElements.AutoSize = true;
|
||||
this.checkBoxModelElements.Location = new System.Drawing.Point(10, 20);
|
||||
this.checkBoxModelElements.Name = "checkBoxModelElements";
|
||||
this.checkBoxModelElements.Size = new System.Drawing.Size(100, 17);
|
||||
this.checkBoxModelElements.TabIndex = 0;
|
||||
this.checkBoxModelElements.Text = "Model Elements";
|
||||
this.checkBoxModelElements.UseVisualStyleBackColor = true;
|
||||
this.checkBoxModelElements.CheckedChanged += new System.EventHandler(this.checkBoxModelElements_CheckedChanged);
|
||||
//
|
||||
// buttonOK
|
||||
//
|
||||
this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.buttonOK.Location = new System.Drawing.Point(114, 230);
|
||||
this.buttonOK.Name = "buttonOK";
|
||||
this.buttonOK.Size = new System.Drawing.Size(91, 23);
|
||||
this.buttonOK.TabIndex = 1;
|
||||
this.buttonOK.Text = "&OK";
|
||||
this.buttonOK.UseVisualStyleBackColor = true;
|
||||
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.buttonCancel.Location = new System.Drawing.Point(220, 230);
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.Size = new System.Drawing.Size(101, 23);
|
||||
this.buttonCancel.TabIndex = 1;
|
||||
this.buttonCancel.Text = "&Cancel";
|
||||
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxMergeViews
|
||||
//
|
||||
this.checkBoxMergeViews.AutoSize = true;
|
||||
this.checkBoxMergeViews.Location = new System.Drawing.Point(23, 195);
|
||||
this.checkBoxMergeViews.Name = "checkBoxMergeViews";
|
||||
this.checkBoxMergeViews.Size = new System.Drawing.Size(226, 17);
|
||||
this.checkBoxMergeViews.TabIndex = 4;
|
||||
this.checkBoxMergeViews.Text = "Create separate files for each view/sheet";
|
||||
this.checkBoxMergeViews.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// groupBoxGraphicsSetting
|
||||
//
|
||||
this.groupBoxGraphicsSetting.Controls.Add(this.comboBoxImageQuality);
|
||||
this.groupBoxGraphicsSetting.Controls.Add(this.labelImageQuality);
|
||||
this.groupBoxGraphicsSetting.Controls.Add(this.radioButtonCompressedFormat);
|
||||
this.groupBoxGraphicsSetting.Controls.Add(this.radioButtonStandardFormat);
|
||||
this.groupBoxGraphicsSetting.Location = new System.Drawing.Point(13, 88);
|
||||
this.groupBoxGraphicsSetting.Name = "groupBoxGraphicsSetting";
|
||||
this.groupBoxGraphicsSetting.Size = new System.Drawing.Size(308, 100);
|
||||
this.groupBoxGraphicsSetting.TabIndex = 5;
|
||||
this.groupBoxGraphicsSetting.TabStop = false;
|
||||
this.groupBoxGraphicsSetting.Text = "Graphics Settings";
|
||||
//
|
||||
// comboBoxImageQuality
|
||||
//
|
||||
this.comboBoxImageQuality.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBoxImageQuality.FormattingEnabled = true;
|
||||
this.comboBoxImageQuality.Location = new System.Drawing.Point(129, 66);
|
||||
this.comboBoxImageQuality.Name = "comboBoxImageQuality";
|
||||
this.comboBoxImageQuality.Size = new System.Drawing.Size(163, 21);
|
||||
this.comboBoxImageQuality.TabIndex = 3;
|
||||
//
|
||||
// labelImageQuality
|
||||
//
|
||||
this.labelImageQuality.AutoSize = true;
|
||||
this.labelImageQuality.Location = new System.Drawing.Point(54, 69);
|
||||
this.labelImageQuality.Name = "labelImageQuality";
|
||||
this.labelImageQuality.Size = new System.Drawing.Size(78, 13);
|
||||
this.labelImageQuality.TabIndex = 2;
|
||||
this.labelImageQuality.Text = "Image Quality:";
|
||||
//
|
||||
// radioButtonCompressedFormat
|
||||
//
|
||||
this.radioButtonCompressedFormat.AutoSize = true;
|
||||
this.radioButtonCompressedFormat.Location = new System.Drawing.Point(10, 41);
|
||||
this.radioButtonCompressedFormat.Name = "radioButtonCompressedFormat";
|
||||
this.radioButtonCompressedFormat.Size = new System.Drawing.Size(170, 17);
|
||||
this.radioButtonCompressedFormat.TabIndex = 0;
|
||||
this.radioButtonCompressedFormat.TabStop = true;
|
||||
this.radioButtonCompressedFormat.Text = "Use compressed raster format";
|
||||
this.radioButtonCompressedFormat.UseVisualStyleBackColor = true;
|
||||
this.radioButtonCompressedFormat.CheckedChanged += new System.EventHandler(this.radioButtonCompressedFormat_CheckedChanged);
|
||||
//
|
||||
// radioButtonStandardFormat
|
||||
//
|
||||
this.radioButtonStandardFormat.AutoSize = true;
|
||||
this.radioButtonStandardFormat.Location = new System.Drawing.Point(10, 20);
|
||||
this.radioButtonStandardFormat.Name = "radioButtonStandardFormat";
|
||||
this.radioButtonStandardFormat.Size = new System.Drawing.Size(124, 17);
|
||||
this.radioButtonStandardFormat.TabIndex = 0;
|
||||
this.radioButtonStandardFormat.TabStop = true;
|
||||
this.radioButtonStandardFormat.Text = "Use standard format";
|
||||
this.radioButtonStandardFormat.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// ExportDWFOptionForm
|
||||
//
|
||||
this.AcceptButton = this.buttonOK;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.buttonCancel;
|
||||
this.ClientSize = new System.Drawing.Size(335, 262);
|
||||
this.Controls.Add(this.groupBoxGraphicsSetting);
|
||||
this.Controls.Add(this.checkBoxMergeViews);
|
||||
this.Controls.Add(this.buttonCancel);
|
||||
this.Controls.Add(this.buttonOK);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "ExportDWFOptionForm";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Export DWF Options";
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.groupBoxGraphicsSetting.ResumeLayout(false);
|
||||
this.groupBoxGraphicsSetting.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.CheckBox checkBoxRoomsAndAreas;
|
||||
private System.Windows.Forms.CheckBox checkBoxModelElements;
|
||||
private System.Windows.Forms.Button buttonOK;
|
||||
private System.Windows.Forms.Button buttonCancel;
|
||||
private System.Windows.Forms.CheckBox checkBoxMergeViews;
|
||||
private System.Windows.Forms.GroupBox groupBoxGraphicsSetting;
|
||||
private System.Windows.Forms.ComboBox comboBoxImageQuality;
|
||||
private System.Windows.Forms.Label labelImageQuality;
|
||||
private System.Windows.Forms.RadioButton radioButtonCompressedFormat;
|
||||
private System.Windows.Forms.RadioButton radioButtonStandardFormat;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Data class which stores information of lower priority for exporting DWF(x) format.
|
||||
/// </summary>
|
||||
public partial class ExportDWFOptionForm : System.Windows.Forms.Form
|
||||
{
|
||||
/// <summary>
|
||||
/// ExportDWFData object
|
||||
/// </summary>
|
||||
private ExportDWFData m_data;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="data">Data class object</param>
|
||||
public ExportDWFOptionForm(ExportDWFData data)
|
||||
{
|
||||
m_data = data;
|
||||
InitializeComponent();
|
||||
Initialize();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialize controls
|
||||
/// </summary>
|
||||
private void Initialize()
|
||||
{
|
||||
checkBoxModelElements.Checked = m_data.ExportObjectData;
|
||||
checkBoxRoomsAndAreas.Checked = m_data.ExportAreas;
|
||||
radioButtonStandardFormat.Checked = true;
|
||||
radioButtonCompressedFormat.Checked = false;
|
||||
labelImageQuality.Enabled = false;
|
||||
comboBoxImageQuality.Enabled = false;
|
||||
comboBoxImageQuality.DataSource = m_data.ImageQualities;
|
||||
checkBoxMergeViews.Enabled = !m_data.CurrentViewOnly;
|
||||
checkBoxMergeViews.Checked = !m_data.CurrentViewOnly;
|
||||
checkBoxMergeViews.Text = "Combine selected views and sheets into a single file";
|
||||
}
|
||||
|
||||
private void buttonOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
m_data.ExportObjectData = checkBoxModelElements.Checked;
|
||||
m_data.ExportAreas = checkBoxRoomsAndAreas.Enabled ? checkBoxRoomsAndAreas.Checked : false;
|
||||
m_data.ExportMergeFiles = checkBoxMergeViews.Checked;
|
||||
if (radioButtonStandardFormat.Checked)
|
||||
{
|
||||
m_data.DwfImageFormat = Autodesk.Revit.DB.DWFImageFormat.Lossless;
|
||||
m_data.DwfImageQuality = Autodesk.Revit.DB.DWFImageQuality.Default;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_data.DwfImageFormat = Autodesk.Revit.DB.DWFImageFormat.Lossy;
|
||||
m_data.DwfImageQuality = m_data.ImageQualities[comboBoxImageQuality.SelectedIndex];
|
||||
}
|
||||
}
|
||||
|
||||
private void checkBoxModelElements_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
checkBoxRoomsAndAreas.Enabled = checkBoxModelElements.Checked ? true : false;
|
||||
}
|
||||
|
||||
private void radioButtonCompressedFormat_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
labelImageQuality.Enabled = radioButtonCompressedFormat.Checked;
|
||||
comboBoxImageQuality.Enabled = radioButtonCompressedFormat.Checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,199 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Reflection;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Data class which stores the main information for exporting dwg format
|
||||
/// </summary>
|
||||
public class ExportDWGData : ExportDataWithViews
|
||||
{
|
||||
#region Class Member Variables
|
||||
/// <summary>
|
||||
/// Data class ExportOptionsData
|
||||
/// </summary>
|
||||
private ExportBaseOptionsData m_exportOptionsData;
|
||||
|
||||
/// <summary>
|
||||
/// String list of AutoCAD versions
|
||||
/// </summary>
|
||||
private List<String> m_fileVersion;
|
||||
|
||||
/// <summary>
|
||||
/// List of Autodesk.Revit.DB.ACADVersion defined in Revit
|
||||
/// </summary>
|
||||
private List<Autodesk.Revit.DB.ACADVersion> m_enumFileVersion;
|
||||
|
||||
/// <summary>
|
||||
/// File version option to export
|
||||
/// </summary>
|
||||
private Autodesk.Revit.DB.ACADVersion m_exportFileVersion;
|
||||
#endregion
|
||||
|
||||
#region Class Properties
|
||||
/// <summary>
|
||||
/// Data class ExportOptionsData
|
||||
/// </summary>
|
||||
public ExportBaseOptionsData ExportOptionsData
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportOptionsData;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_exportOptionsData = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// String collection of AutoCAD versions
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<String> FileVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<String>(m_fileVersion);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Collection of Autodesk.Revit.DB.ACADVersion defined in Revit
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<Autodesk.Revit.DB.ACADVersion> EnumFileVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<Autodesk.Revit.DB.ACADVersion>(m_enumFileVersion);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// File version option to export
|
||||
/// </summary>
|
||||
public Autodesk.Revit.DB.ACADVersion ExportFileVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportFileVersion;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_exportFileVersion = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Class Member Methods
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="commandData">Revit command data</param>
|
||||
/// <param name="exportFormat">Format to export</param>
|
||||
public ExportDWGData(ExternalCommandData commandData, ExportFormat exportFormat)
|
||||
: base(commandData, exportFormat)
|
||||
{
|
||||
m_exportOptionsData = new ExportBaseOptionsData();
|
||||
|
||||
Initialize();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the variables
|
||||
/// </summary>
|
||||
private void Initialize()
|
||||
{
|
||||
//AutoCAD versions
|
||||
m_fileVersion = new List<String>();
|
||||
m_enumFileVersion = new List<Autodesk.Revit.DB.ACADVersion>();
|
||||
m_fileVersion.Add("AutoCAD 2013 DWG Files (*.dwg)");
|
||||
m_enumFileVersion.Add(Autodesk.Revit.DB.ACADVersion.R2013);
|
||||
m_fileVersion.Add("AutoCAD 2010 DWG Files (*.dwg)");
|
||||
m_enumFileVersion.Add(Autodesk.Revit.DB.ACADVersion.R2010);
|
||||
m_fileVersion.Add("AutoCAD 2007 DWG Files (*.dwg)");
|
||||
m_enumFileVersion.Add(Autodesk.Revit.DB.ACADVersion.R2007);
|
||||
|
||||
|
||||
StringBuilder tmp = new StringBuilder();
|
||||
foreach (String version in m_fileVersion)
|
||||
{
|
||||
tmp.Append(version + "|*.dwg|");
|
||||
}
|
||||
m_filter = tmp.ToString().TrimEnd('|');
|
||||
m_title = "Export DWG";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Collect the parameters and export
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override bool Export()
|
||||
{
|
||||
base.Export();
|
||||
|
||||
bool exported = false;
|
||||
//parameter : views
|
||||
IList<ElementId> views = new List<ElementId>();
|
||||
if (m_currentViewOnly)
|
||||
{
|
||||
views.Add(m_activeDoc.ActiveView.Id);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (View view in m_selectViewsData.SelectedViews)
|
||||
{
|
||||
views.Add(view.Id);
|
||||
}
|
||||
}
|
||||
|
||||
// Default values
|
||||
m_exportFileVersion = ACADVersion.R2010;
|
||||
//parameter : DWGExportOptions dwgExportOptions
|
||||
DWGExportOptions dwgExportOptions = new DWGExportOptions();
|
||||
dwgExportOptions.ExportingAreas = m_exportOptionsData.ExportAreas;
|
||||
dwgExportOptions.ExportOfSolids = m_exportOptionsData.ExportSolid;
|
||||
dwgExportOptions.FileVersion = m_exportFileVersion;
|
||||
dwgExportOptions.LayerMapping = m_exportOptionsData.ExportLayerMapping;
|
||||
dwgExportOptions.LineScaling = m_exportOptionsData.ExportLineScaling;
|
||||
dwgExportOptions.MergedViews = m_exportOptionsData.ExportMergeFiles;
|
||||
dwgExportOptions.PropOverrides = m_exportOptionsData.ExportLayersAndProperties;
|
||||
dwgExportOptions.SharedCoords = m_exportOptionsData.ExportCoorSystem;
|
||||
dwgExportOptions.TargetUnit = m_exportOptionsData.ExportUnit;
|
||||
|
||||
//Export
|
||||
exported = m_activeDoc.Export(m_exportFolder, m_exportFileName, views, dwgExportOptions);
|
||||
|
||||
return exported;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,469 @@
|
||||
//
|
||||
// (C) Copyright 2003-2014 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
using Autodesk.Revit;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Data class which stores lower priority information for exporting dwg format
|
||||
/// </summary>
|
||||
public class ExportDWGOptionsData
|
||||
{
|
||||
#region Class Memeber Variables
|
||||
/// <summary>
|
||||
/// String list of Layers and properties used in UI
|
||||
/// </summary>
|
||||
List<String> m_layersAndProperties;
|
||||
|
||||
/// <summary>
|
||||
/// List of Autodesk.Revit.DB.PropOverrideMode
|
||||
/// </summary>
|
||||
List<Autodesk.Revit.DB.PropOverrideMode> m_enumLayersAndProperties;
|
||||
|
||||
/// <summary>
|
||||
/// String list of Layer Settings used in UI
|
||||
/// </summary>
|
||||
List<String> m_layerMapping;
|
||||
|
||||
/// <summary>
|
||||
/// String list of layer settings values defined in Revit
|
||||
/// </summary>
|
||||
List<String> m_enumLayerMapping;
|
||||
|
||||
/// <summary>
|
||||
/// Layer setting option to export
|
||||
/// </summary>
|
||||
String m_exportLayerMapping;
|
||||
|
||||
/// <summary>
|
||||
/// String list of Linetype scaling used in UI
|
||||
/// </summary>
|
||||
List<String> m_lineScaling;
|
||||
|
||||
/// <summary>
|
||||
/// PropOverrideMode Option to export
|
||||
/// </summary>
|
||||
Autodesk.Revit.DB.PropOverrideMode m_exportLayersAndProperties;
|
||||
|
||||
/// <summary>
|
||||
/// List of Autodesk.Revit.DB.LineScaling defined in Revit
|
||||
/// </summary>
|
||||
List<Autodesk.Revit.DB.LineScaling> m_enumLineScaling;
|
||||
|
||||
/// <summary>
|
||||
/// Line scaling option to export
|
||||
/// </summary>
|
||||
Autodesk.Revit.DB.LineScaling m_exportLineScaling;
|
||||
|
||||
/// <summary>
|
||||
/// String list of Coordinate system basis
|
||||
/// </summary>
|
||||
List<String> m_coorSystem;
|
||||
|
||||
/// <summary>
|
||||
/// List of values whether to use shared coordinate system
|
||||
/// </summary>
|
||||
List<bool> m_enumCoorSystem;
|
||||
|
||||
/// <summary>
|
||||
/// Coordinate system basis option to export
|
||||
/// </summary>
|
||||
bool m_exportCoorSystem;
|
||||
|
||||
/// <summary>
|
||||
/// String list of DWG unit
|
||||
/// </summary>
|
||||
List<String> m_units;
|
||||
|
||||
/// <summary>
|
||||
/// List of Autodesk.Revit.DB.ExportUnit values defined in Revit
|
||||
/// </summary>
|
||||
List<Autodesk.Revit.DB.ExportUnit> m_enumUnits;
|
||||
|
||||
/// <summary>
|
||||
/// Export unit option to export
|
||||
/// </summary>
|
||||
Autodesk.Revit.DB.ExportUnit m_exportUnit;
|
||||
|
||||
/// <summary>
|
||||
/// String list of solid used in UI
|
||||
/// </summary>
|
||||
List<String> m_solids;
|
||||
|
||||
/// <summary>
|
||||
/// List of Autodesk.Revit.DB.SolidGeometry defined in Revit
|
||||
/// </summary>
|
||||
List<Autodesk.Revit.DB.SolidGeometry> m_enumSolids;
|
||||
|
||||
/// <summary>
|
||||
/// Solid geometry option to export
|
||||
/// </summary>
|
||||
Autodesk.Revit.DB.SolidGeometry m_exportSolid;
|
||||
|
||||
/// <summary>
|
||||
/// Whether to create separate files for each view/sheet
|
||||
/// </summary>
|
||||
bool m_exportMergeFiles;
|
||||
|
||||
//Export rooms and areas as polylines
|
||||
bool m_exportAreas;
|
||||
#endregion
|
||||
|
||||
#region Class Properties
|
||||
/// <summary>
|
||||
/// String collection of Layers and properties used in UI
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<String> LayersAndProperties
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<String>(m_layersAndProperties);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Collection of Autodesk.Revit.DB.PropOverrideMode
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<Autodesk.Revit.DB.PropOverrideMode> EnumLayersAndProperties
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<Autodesk.Revit.DB.PropOverrideMode>(m_enumLayersAndProperties);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// PropOverrideMode Option to export
|
||||
/// </summary>
|
||||
public Autodesk.Revit.DB.PropOverrideMode ExportLayersAndProperties
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportLayersAndProperties;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_exportLayersAndProperties = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// String collection of Layer Settings used in UI
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<String> LayerMapping
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<String>(m_layerMapping);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// String collection of layer settings values defined in Revit
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<String> EnumLayerMapping
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<String>(m_enumLayerMapping);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Layer setting option to export
|
||||
/// </summary>
|
||||
public String ExportLayerMapping
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportLayerMapping;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_exportLayerMapping = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// String collection of Linetype scaling used in UI
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<String> LineScaling
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<String>(m_lineScaling);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Collection of Autodesk.Revit.DB.LineScaling defined in Revit
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<Autodesk.Revit.DB.LineScaling> EnumLineScaling
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<Autodesk.Revit.DB.LineScaling>(m_enumLineScaling);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Line scaling option to export
|
||||
/// </summary>
|
||||
public Autodesk.Revit.DB.LineScaling ExportLineScaling
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportLineScaling;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_exportLineScaling = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// String collection of Coordinate system basis
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<String> CoorSystem
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<String>(m_coorSystem);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Collection of values whether to use shared coordinate system
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<bool> EnumCoorSystem
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<bool>(m_enumCoorSystem);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Coordinate system basis option to export
|
||||
/// </summary>
|
||||
public bool ExportCoorSystem
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportCoorSystem;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_exportCoorSystem = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// String collection of DWG unit
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<String> Units
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<String>(m_units);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Collection of Autodesk.Revit.DB.ExportUnit values defined in Revit
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<Autodesk.Revit.DB.ExportUnit> EnumUnits
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<Autodesk.Revit.DB.ExportUnit>(m_enumUnits);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Export unit option to export
|
||||
/// </summary>
|
||||
public Autodesk.Revit.DB.ExportUnit ExportUnit
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportUnit;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_exportUnit = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// String collection of solid used in UI
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<String> Solids
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<String>(m_solids);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Collection of Autodesk.Revit.DB.SolidGeometry defined in Revit
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<Autodesk.Revit.DB.SolidGeometry> EnumSolids
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<Autodesk.Revit.DB.SolidGeometry>(m_enumSolids);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Property of solid geometry option to export
|
||||
/// </summary>
|
||||
public Autodesk.Revit.DB.SolidGeometry ExportSolid
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportSolid;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_exportSolid = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Export rooms and areas as polylines
|
||||
/// </summary>
|
||||
public bool ExportAreas
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportAreas;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_exportAreas = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether to create separate files for each view/sheet
|
||||
/// </summary>
|
||||
public bool ExportMergeFiles
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportMergeFiles;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_exportMergeFiles = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region Class Member Methods
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public ExportDWGOptionsData()
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
/// <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);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,198 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Reflection;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;using System.Windows.Forms;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Data class which stores the main information for exporting dxf format
|
||||
/// </summary>
|
||||
public class ExportDXFData : ExportDataWithViews
|
||||
{
|
||||
#region Class Member Variables
|
||||
/// <summary>
|
||||
/// Data class ExportOptionsData
|
||||
/// </summary>
|
||||
private ExportBaseOptionsData m_exportOptionsData;
|
||||
|
||||
/// <summary>
|
||||
/// String list of AutoCAD versions
|
||||
/// </summary>
|
||||
private List<String> m_fileVersion;
|
||||
|
||||
/// <summary>
|
||||
/// List of Autodesk.Revit.DB.ACADVersion defined in Revit
|
||||
/// </summary>
|
||||
private List<Autodesk.Revit.DB.ACADVersion> m_enumFileVersion;
|
||||
|
||||
/// <summary>
|
||||
/// File version option to export
|
||||
/// </summary>
|
||||
private Autodesk.Revit.DB.ACADVersion m_exportFileVersion;
|
||||
#endregion
|
||||
|
||||
#region Class Properties
|
||||
/// <summary>
|
||||
/// Data class ExportOptionsData
|
||||
/// </summary>
|
||||
public ExportBaseOptionsData ExportOptionsData
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportOptionsData;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_exportOptionsData = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// String collection of AutoCAD versions
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<String> FileVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<String>(m_fileVersion);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Collection of Autodesk.Revit.DB.ACADVersion defined in Revit
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<Autodesk.Revit.DB.ACADVersion> EnumFileVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<Autodesk.Revit.DB.ACADVersion>(m_enumFileVersion);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// File version option to export
|
||||
/// </summary>
|
||||
public Autodesk.Revit.DB.ACADVersion ExportFileVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportFileVersion;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_exportFileVersion = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Class Member Methods
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="commandData">Revit command data</param>
|
||||
/// <param name="exportFormat">Format to export</param>
|
||||
public ExportDXFData(ExternalCommandData commandData, ExportFormat exportFormat)
|
||||
: base(commandData, exportFormat)
|
||||
{
|
||||
m_exportOptionsData = new ExportBaseOptionsData();
|
||||
|
||||
Initialize();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the variables
|
||||
/// </summary>
|
||||
private void Initialize()
|
||||
{
|
||||
//AutoCAD versions
|
||||
m_fileVersion = new List<String>();
|
||||
m_enumFileVersion = new List<Autodesk.Revit.DB.ACADVersion>();
|
||||
m_fileVersion.Add("AutoCAD 2013 DXF Files (*.dxf)");
|
||||
m_enumFileVersion.Add(Autodesk.Revit.DB.ACADVersion.R2013);
|
||||
m_fileVersion.Add("AutoCAD 2010 DXF Files (*.dxf)");
|
||||
m_enumFileVersion.Add(Autodesk.Revit.DB.ACADVersion.R2010);
|
||||
m_fileVersion.Add("AutoCAD 2007 DXF Files (*.dxf)");
|
||||
m_enumFileVersion.Add(Autodesk.Revit.DB.ACADVersion.R2007);
|
||||
|
||||
StringBuilder tmp = new StringBuilder();
|
||||
foreach (String version in m_fileVersion)
|
||||
{
|
||||
tmp.Append(version + "|*.dxf|");
|
||||
}
|
||||
m_filter = tmp.ToString().TrimEnd('|');
|
||||
m_title = "Export DXF";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Collect the parameters and export
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override bool Export()
|
||||
{
|
||||
base.Export();
|
||||
|
||||
bool exported = false;
|
||||
|
||||
//parameter : views
|
||||
IList<ElementId> views = new List<ElementId>();
|
||||
if (m_currentViewOnly)
|
||||
{
|
||||
views.Add(m_activeDoc.ActiveView.Id);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (Autodesk.Revit.DB.View view in m_selectViewsData.SelectedViews)
|
||||
{
|
||||
views.Add(view.Id);
|
||||
}
|
||||
}
|
||||
// Default values
|
||||
m_exportFileVersion = ACADVersion.R2010;
|
||||
//parameter : DXFExportOptions dxfExportOptions
|
||||
DXFExportOptions dxfExportOptions = new DXFExportOptions();
|
||||
dxfExportOptions.ExportingAreas = m_exportOptionsData.ExportAreas;
|
||||
dxfExportOptions.ExportOfSolids = m_exportOptionsData.ExportSolid;
|
||||
dxfExportOptions.FileVersion = m_exportFileVersion;
|
||||
dxfExportOptions.LayerMapping = m_exportOptionsData.ExportLayerMapping;
|
||||
dxfExportOptions.LineScaling = m_exportOptionsData.ExportLineScaling;
|
||||
//dxfExportOptions.MergedViews = m_exportOptionsData.ExportMergeFiles;
|
||||
dxfExportOptions.PropOverrides = m_exportOptionsData.ExportLayersAndProperties;
|
||||
dxfExportOptions.SharedCoords = m_exportOptionsData.ExportCoorSystem;
|
||||
dxfExportOptions.TargetUnit = m_exportOptionsData.ExportUnit;
|
||||
|
||||
//Export
|
||||
exported = m_activeDoc.Export(m_exportFolder, m_exportFileName, views, dxfExportOptions);
|
||||
|
||||
return exported;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,338 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Reflection;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.IO;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Base data class which stores the basic information for export
|
||||
/// </summary>
|
||||
public class ExportData
|
||||
{
|
||||
#region Class Member Variables
|
||||
/// <summary>
|
||||
/// Revit command data
|
||||
/// </summary>
|
||||
protected ExternalCommandData m_commandData;
|
||||
|
||||
/// <summary>
|
||||
/// Active document
|
||||
/// </summary>
|
||||
protected Document m_activeDoc;
|
||||
|
||||
/// <summary>
|
||||
/// File Name or Prefix to be used
|
||||
/// </summary>
|
||||
protected String m_exportFileName;
|
||||
|
||||
/// <summary>
|
||||
/// Directory to store the exported file
|
||||
/// </summary>
|
||||
protected String m_exportFolder;
|
||||
|
||||
/// <summary>
|
||||
/// ActiveDocument Name
|
||||
/// </summary>
|
||||
protected String m_activeDocName;
|
||||
|
||||
/// <summary>
|
||||
/// ActiveView Name
|
||||
/// </summary>
|
||||
protected String m_activeViewName;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Whether current view is a 3D view
|
||||
/// </summary>
|
||||
protected bool m_is3DView;
|
||||
|
||||
/// <summary>
|
||||
/// The format to be exported
|
||||
/// </summary>
|
||||
protected ExportFormat m_exportFormat;
|
||||
|
||||
/// <summary>
|
||||
/// The filter which will be used in file saving dialog
|
||||
/// </summary>
|
||||
protected String m_filter;
|
||||
|
||||
/// <summary>
|
||||
/// The title of exporting dialog
|
||||
/// </summary>
|
||||
protected String m_title;
|
||||
#endregion
|
||||
|
||||
#region Class Properties
|
||||
/// <summary>
|
||||
/// Revit command data
|
||||
/// </summary>
|
||||
public ExternalCommandData CommandData
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_commandData;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ActiveDocument
|
||||
/// </summary>
|
||||
public Document ActiveDocument
|
||||
{
|
||||
|
||||
get
|
||||
{
|
||||
return m_activeDoc;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// File Name or Prefix to be used
|
||||
/// </summary>
|
||||
public String ExportFileName
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportFileName;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_exportFileName = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Directory to store the exported file
|
||||
/// </summary>
|
||||
public String ExportFolder
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportFolder;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_exportFolder = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ActiveDocument Name
|
||||
/// </summary>
|
||||
public String ActiveDocName
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_activeDocName;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_activeDocName = value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ActiveView Name
|
||||
/// </summary>
|
||||
public String ActiveViewName
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_activeViewName;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_activeViewName = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Whether current view is a 3D view
|
||||
/// </summary>
|
||||
public bool Is3DView
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_is3DView;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_is3DView = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The format to be exported
|
||||
/// </summary>
|
||||
public ExportFormat ExportFormat
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportFormat;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_exportFormat = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The filter which will be used in file saving dialog
|
||||
/// </summary>
|
||||
public String Filter
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_filter;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The title of exporting dialog
|
||||
/// </summary>
|
||||
public String Title
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_title;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region Class Member Methods
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="commandData">Revit command data</param>
|
||||
/// <param name="exportFormat">Format to export</param>
|
||||
public ExportData(ExternalCommandData commandData, ExportFormat exportFormat)
|
||||
{
|
||||
m_commandData = commandData;
|
||||
m_activeDoc = commandData.Application.ActiveUIDocument.Document;
|
||||
m_exportFormat = exportFormat;
|
||||
m_filter = String.Empty;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the variables
|
||||
/// </summary>
|
||||
private void Initialize()
|
||||
{
|
||||
//The directory into which the file will be exported
|
||||
String dllFilePath = Assembly.GetExecutingAssembly().Location;
|
||||
m_exportFolder = Path.GetDirectoryName(dllFilePath);
|
||||
|
||||
//The file name to be used by export
|
||||
m_activeDocName = m_activeDoc.Title;
|
||||
m_activeViewName = m_activeDoc.ActiveView.Name;
|
||||
String viewType = m_activeDoc.ActiveView.ViewType.ToString();
|
||||
m_exportFileName = m_activeDocName + "-" + viewType + "-" + m_activeViewName + "." + getExtension().ToString();
|
||||
|
||||
//Whether current active view is 3D view
|
||||
if (m_activeDoc.ActiveView.ViewType == Autodesk.Revit.DB.ViewType.ThreeD)
|
||||
{
|
||||
m_is3DView = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_is3DView = false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the extension of the file to export
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private String getExtension()
|
||||
{
|
||||
String extension = null;
|
||||
switch (m_exportFormat)
|
||||
{
|
||||
case ExportFormat.DWG:
|
||||
extension = "dwg";
|
||||
break;
|
||||
case ExportFormat.DXF:
|
||||
extension = "dxf";
|
||||
break;
|
||||
case ExportFormat.SAT:
|
||||
extension = "sat";
|
||||
break;
|
||||
case ExportFormat.DWF:
|
||||
extension = "dwf";
|
||||
break;
|
||||
case ExportFormat.DWFx:
|
||||
extension = "dwfx";
|
||||
break;
|
||||
case ExportFormat.GBXML:
|
||||
extension = "xml";
|
||||
break;
|
||||
case ExportFormat.FBX:
|
||||
extension = "fbx";
|
||||
break;
|
||||
case ExportFormat.DGN:
|
||||
extension = "dgn";
|
||||
break;
|
||||
case ExportFormat.Image:
|
||||
extension = "";
|
||||
break;
|
||||
case ExportFormat.PDF:
|
||||
extension = "pdf";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return extension;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Collect the parameters and export
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public virtual bool Export()
|
||||
{
|
||||
if (m_exportFolder == null || m_exportFileName == null)
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Base data class which stores the common information for exporting view related format
|
||||
/// </summary>
|
||||
public class ExportDataWithViews : ExportData
|
||||
{
|
||||
#region Class Member Variables
|
||||
/// <summary>
|
||||
/// Data class SelectViewsData
|
||||
/// </summary>
|
||||
protected SelectViewsData m_selectViewsData;
|
||||
|
||||
/// <summary>
|
||||
/// Views to export
|
||||
/// </summary>
|
||||
private ViewSet m_exportViews;
|
||||
|
||||
/// <summary>
|
||||
/// Whether to export current view only
|
||||
/// </summary>
|
||||
protected bool m_currentViewOnly;
|
||||
#endregion
|
||||
|
||||
#region Class Properties
|
||||
/// <summary>
|
||||
/// Data class SelectViewsData
|
||||
/// </summary>
|
||||
public SelectViewsData SelectViewsData
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_selectViewsData;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_selectViewsData = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Views to export
|
||||
/// </summary>
|
||||
public ViewSet ExportViews
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportViews;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_exportViews = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether to export current view only
|
||||
/// </summary>
|
||||
public bool CurrentViewOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_currentViewOnly;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_currentViewOnly = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Class Member Methods
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="commandData">Revit command data</param>
|
||||
/// <param name="exportFormat">Format to export</param>
|
||||
public ExportDataWithViews(ExternalCommandData commandData, ExportFormat exportFormat)
|
||||
: base(commandData, exportFormat)
|
||||
{
|
||||
m_selectViewsData = new SelectViewsData(commandData);
|
||||
|
||||
Initialize();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the variables
|
||||
/// </summary>
|
||||
private void Initialize()
|
||||
{
|
||||
//Views to export
|
||||
m_exportViews = new ViewSet();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Data class which stores the information for exporting fbx format
|
||||
/// </summary>
|
||||
class ExportFBXData : ExportData
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="commandData">Revit command data</param>
|
||||
/// <param name="exportFormat">Format to export</param>
|
||||
public ExportFBXData(ExternalCommandData commandData, ExportFormat exportFormat)
|
||||
: base(commandData, exportFormat)
|
||||
{
|
||||
m_filter = "FBX Files |*.fbx";
|
||||
m_title = "Export FBX";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Export FBX format
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override bool Export()
|
||||
{
|
||||
base.Export();
|
||||
|
||||
bool exported = false;
|
||||
//parameter : ViewSet views
|
||||
ViewSet views = new ViewSet();
|
||||
views.Insert(m_activeDoc.ActiveView);
|
||||
|
||||
FBXExportOptions options = new FBXExportOptions();
|
||||
exported = m_activeDoc.Export(m_exportFolder, m_exportFileName, views, options);
|
||||
|
||||
return exported;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Data class which stores the information for exporting gbxml format
|
||||
/// </summary>
|
||||
class ExportGBXMLData : ExportData
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="commandData">Revit command data</param>
|
||||
/// <param name="exportFormat">Format to export</param>
|
||||
public ExportGBXMLData(ExternalCommandData commandData, ExportFormat exportFormat)
|
||||
: base(commandData, exportFormat)
|
||||
{
|
||||
m_filter = "XML Documents |*.xml";
|
||||
m_title = "Export GBXML";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Export GBXML format
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override bool Export()
|
||||
{
|
||||
Transaction transaction = new Transaction(m_activeDoc, "Export_To_GBXML");
|
||||
transaction.Start();
|
||||
base.Export();
|
||||
|
||||
GBXMLExportOptions options = new GBXMLExportOptions();
|
||||
bool exported = m_activeDoc.Export(m_exportFolder, m_exportFileName, options);
|
||||
transaction.Commit();
|
||||
|
||||
return exported;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
class ExportIMGData : ExportDataWithViews
|
||||
{
|
||||
#region Class Member Variables
|
||||
|
||||
/// <summary>
|
||||
/// String list of image type
|
||||
/// </summary>
|
||||
private List<String> m_imageType;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Class Member Methods
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="commandData">Revit command data</param>
|
||||
/// <param name="exportFormat">Format to export</param>
|
||||
public ExportIMGData(ExternalCommandData commandData, ExportFormat exportFormat)
|
||||
: base(commandData, exportFormat)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the variables
|
||||
/// </summary>
|
||||
private void Initialize()
|
||||
{
|
||||
//Image type
|
||||
m_imageType = new List<String>();
|
||||
m_imageType.Add("(*.bmp)");
|
||||
m_imageType.Add("(*.jpeg)");
|
||||
m_imageType.Add("(*.png)");
|
||||
m_imageType.Add("(*.tga)");
|
||||
m_imageType.Add("(*.tif)");
|
||||
|
||||
StringBuilder tmp = new StringBuilder();
|
||||
tmp.Append(m_imageType[0] + "|*.bmp|");
|
||||
tmp.Append(m_imageType[1] + "|*.jpeg|");
|
||||
tmp.Append(m_imageType[2] + "|*.png|");
|
||||
tmp.Append(m_imageType[3] + "|*.tga|");
|
||||
tmp.Append(m_imageType[4] + "|*.tif|");
|
||||
|
||||
m_filter = tmp.ToString().TrimEnd('|');
|
||||
m_title = "Export IMG";
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Collect the parameters and export
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override bool Export()
|
||||
{
|
||||
base.Export();
|
||||
return true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,470 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
partial class ExportIMGOptionsForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.outputGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.saveAs = new System.Windows.Forms.TextBox();
|
||||
this.name = new System.Windows.Forms.Label();
|
||||
this.changePath = new System.Windows.Forms.Button();
|
||||
this.exportRangeGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.selectRange = new System.Windows.Forms.Button();
|
||||
this.viewsSheetsOption = new System.Windows.Forms.RadioButton();
|
||||
this.visiblePortionOption = new System.Windows.Forms.RadioButton();
|
||||
this.currentWindowOption = new System.Windows.Forms.RadioButton();
|
||||
this.imageSizeGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.pixels = new System.Windows.Forms.Label();
|
||||
this.pixelValue = new System.Windows.Forms.TextBox();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.verticalOption = new System.Windows.Forms.RadioButton();
|
||||
this.horizontalOption = new System.Windows.Forms.RadioButton();
|
||||
this.actual = new System.Windows.Forms.Label();
|
||||
this.zoomSize = new System.Windows.Forms.NumericUpDown();
|
||||
this.Direction = new System.Windows.Forms.Label();
|
||||
this.zoomOption = new System.Windows.Forms.RadioButton();
|
||||
this.fitToOption = new System.Windows.Forms.RadioButton();
|
||||
this.formatGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.RIQCom = new System.Windows.Forms.ComboBox();
|
||||
this.noShadedCom = new System.Windows.Forms.ComboBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.Non = new System.Windows.Forms.Label();
|
||||
this.shadedCom = new System.Windows.Forms.ComboBox();
|
||||
this.shaded = new System.Windows.Forms.Label();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.cannelButton = new System.Windows.Forms.Button();
|
||||
this.outputGroupBox.SuspendLayout();
|
||||
this.exportRangeGroupBox.SuspendLayout();
|
||||
this.imageSizeGroupBox.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.zoomSize)).BeginInit();
|
||||
this.formatGroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// outputGroupBox
|
||||
//
|
||||
this.outputGroupBox.Controls.Add(this.saveAs);
|
||||
this.outputGroupBox.Controls.Add(this.name);
|
||||
this.outputGroupBox.Controls.Add(this.changePath);
|
||||
this.outputGroupBox.Location = new System.Drawing.Point(12, 12);
|
||||
this.outputGroupBox.Name = "outputGroupBox";
|
||||
this.outputGroupBox.Size = new System.Drawing.Size(489, 58);
|
||||
this.outputGroupBox.TabIndex = 0;
|
||||
this.outputGroupBox.TabStop = false;
|
||||
this.outputGroupBox.Text = "Output";
|
||||
//
|
||||
// saveAs
|
||||
//
|
||||
this.saveAs.Location = new System.Drawing.Point(55, 20);
|
||||
this.saveAs.Name = "saveAs";
|
||||
this.saveAs.Size = new System.Drawing.Size(385, 21);
|
||||
this.saveAs.TabIndex = 1;
|
||||
//
|
||||
// name
|
||||
//
|
||||
this.name.AutoSize = true;
|
||||
this.name.Location = new System.Drawing.Point(13, 24);
|
||||
this.name.Name = "name";
|
||||
this.name.Size = new System.Drawing.Size(38, 13);
|
||||
this.name.TabIndex = 1;
|
||||
this.name.Text = "Name:";
|
||||
//
|
||||
// changePath
|
||||
//
|
||||
this.changePath.Location = new System.Drawing.Point(443, 19);
|
||||
this.changePath.Name = "changePath";
|
||||
this.changePath.Size = new System.Drawing.Size(27, 23);
|
||||
this.changePath.TabIndex = 1;
|
||||
this.changePath.Text = "...";
|
||||
this.changePath.UseVisualStyleBackColor = true;
|
||||
this.changePath.Click += new System.EventHandler(this.Change_Click);
|
||||
//
|
||||
// exportRangeGroupBox
|
||||
//
|
||||
this.exportRangeGroupBox.Controls.Add(this.selectRange);
|
||||
this.exportRangeGroupBox.Controls.Add(this.viewsSheetsOption);
|
||||
this.exportRangeGroupBox.Controls.Add(this.visiblePortionOption);
|
||||
this.exportRangeGroupBox.Controls.Add(this.currentWindowOption);
|
||||
this.exportRangeGroupBox.Location = new System.Drawing.Point(12, 76);
|
||||
this.exportRangeGroupBox.Name = "exportRangeGroupBox";
|
||||
this.exportRangeGroupBox.Size = new System.Drawing.Size(489, 46);
|
||||
this.exportRangeGroupBox.TabIndex = 1;
|
||||
this.exportRangeGroupBox.TabStop = false;
|
||||
this.exportRangeGroupBox.Text = "Export Range";
|
||||
//
|
||||
// selectRange
|
||||
//
|
||||
this.selectRange.Location = new System.Drawing.Point(443, 16);
|
||||
this.selectRange.Name = "selectRange";
|
||||
this.selectRange.Size = new System.Drawing.Size(27, 23);
|
||||
this.selectRange.TabIndex = 9;
|
||||
this.selectRange.Text = "...";
|
||||
this.selectRange.UseVisualStyleBackColor = true;
|
||||
this.selectRange.Click += new System.EventHandler(this.Select_Click);
|
||||
//
|
||||
// viewsSheetsOption
|
||||
//
|
||||
this.viewsSheetsOption.AutoSize = true;
|
||||
this.viewsSheetsOption.Location = new System.Drawing.Point(307, 19);
|
||||
this.viewsSheetsOption.Name = "viewsSheetsOption";
|
||||
this.viewsSheetsOption.Size = new System.Drawing.Size(132, 17);
|
||||
this.viewsSheetsOption.TabIndex = 8;
|
||||
this.viewsSheetsOption.TabStop = true;
|
||||
this.viewsSheetsOption.Text = "Selected views/sheets";
|
||||
this.viewsSheetsOption.UseVisualStyleBackColor = true;
|
||||
this.viewsSheetsOption.CheckedChanged += new System.EventHandler(this.ViewsSheets_CheckedChanged);
|
||||
//
|
||||
// visiblePortionOption
|
||||
//
|
||||
this.visiblePortionOption.AutoSize = true;
|
||||
this.visiblePortionOption.Location = new System.Drawing.Point(124, 19);
|
||||
this.visiblePortionOption.Name = "visiblePortionOption";
|
||||
this.visiblePortionOption.Size = new System.Drawing.Size(181, 17);
|
||||
this.visiblePortionOption.TabIndex = 7;
|
||||
this.visiblePortionOption.TabStop = true;
|
||||
this.visiblePortionOption.Text = "Visible portion of current window";
|
||||
this.visiblePortionOption.UseVisualStyleBackColor = true;
|
||||
this.visiblePortionOption.CheckedChanged += new System.EventHandler(this.VisiblePortion_CheckedChanged);
|
||||
//
|
||||
// currentWindowOption
|
||||
//
|
||||
this.currentWindowOption.AutoSize = true;
|
||||
this.currentWindowOption.Location = new System.Drawing.Point(20, 19);
|
||||
this.currentWindowOption.Name = "currentWindowOption";
|
||||
this.currentWindowOption.Size = new System.Drawing.Size(101, 17);
|
||||
this.currentWindowOption.TabIndex = 6;
|
||||
this.currentWindowOption.TabStop = true;
|
||||
this.currentWindowOption.Text = "Current window";
|
||||
this.currentWindowOption.UseVisualStyleBackColor = true;
|
||||
this.currentWindowOption.CheckedChanged += new System.EventHandler(this.CurrentWindow_CheckedChanged);
|
||||
//
|
||||
// imageSizeGroupBox
|
||||
//
|
||||
this.imageSizeGroupBox.Controls.Add(this.pixels);
|
||||
this.imageSizeGroupBox.Controls.Add(this.pixelValue);
|
||||
this.imageSizeGroupBox.Controls.Add(this.panel1);
|
||||
this.imageSizeGroupBox.Controls.Add(this.actual);
|
||||
this.imageSizeGroupBox.Controls.Add(this.zoomSize);
|
||||
this.imageSizeGroupBox.Controls.Add(this.Direction);
|
||||
this.imageSizeGroupBox.Controls.Add(this.zoomOption);
|
||||
this.imageSizeGroupBox.Controls.Add(this.fitToOption);
|
||||
this.imageSizeGroupBox.Location = new System.Drawing.Point(12, 128);
|
||||
this.imageSizeGroupBox.Name = "imageSizeGroupBox";
|
||||
this.imageSizeGroupBox.Size = new System.Drawing.Size(489, 77);
|
||||
this.imageSizeGroupBox.TabIndex = 2;
|
||||
this.imageSizeGroupBox.TabStop = false;
|
||||
this.imageSizeGroupBox.Text = "Image size";
|
||||
//
|
||||
// pixels
|
||||
//
|
||||
this.pixels.AutoSize = true;
|
||||
this.pixels.Location = new System.Drawing.Point(169, 20);
|
||||
this.pixels.Name = "pixels";
|
||||
this.pixels.Size = new System.Drawing.Size(34, 13);
|
||||
this.pixels.TabIndex = 2;
|
||||
this.pixels.Text = "pixels";
|
||||
//
|
||||
// pixelValue
|
||||
//
|
||||
this.pixelValue.Location = new System.Drawing.Point(84, 16);
|
||||
this.pixelValue.Name = "pixelValue";
|
||||
this.pixelValue.Size = new System.Drawing.Size(78, 21);
|
||||
this.pixelValue.TabIndex = 8;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Controls.Add(this.verticalOption);
|
||||
this.panel1.Controls.Add(this.horizontalOption);
|
||||
this.panel1.Location = new System.Drawing.Point(306, 16);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(162, 21);
|
||||
this.panel1.TabIndex = 7;
|
||||
//
|
||||
// verticalOption
|
||||
//
|
||||
this.verticalOption.AutoSize = true;
|
||||
this.verticalOption.Location = new System.Drawing.Point(3, 3);
|
||||
this.verticalOption.Name = "verticalOption";
|
||||
this.verticalOption.Size = new System.Drawing.Size(60, 17);
|
||||
this.verticalOption.TabIndex = 0;
|
||||
this.verticalOption.TabStop = true;
|
||||
this.verticalOption.Text = "Vertical";
|
||||
this.verticalOption.UseVisualStyleBackColor = true;
|
||||
this.verticalOption.CheckedChanged += new System.EventHandler(this.Vertical_CheckedChanged);
|
||||
//
|
||||
// horizontalOption
|
||||
//
|
||||
this.horizontalOption.AutoSize = true;
|
||||
this.horizontalOption.Location = new System.Drawing.Point(87, 3);
|
||||
this.horizontalOption.Name = "horizontalOption";
|
||||
this.horizontalOption.Size = new System.Drawing.Size(73, 17);
|
||||
this.horizontalOption.TabIndex = 1;
|
||||
this.horizontalOption.TabStop = true;
|
||||
this.horizontalOption.Text = "Horizontal";
|
||||
this.horizontalOption.UseVisualStyleBackColor = true;
|
||||
this.horizontalOption.CheckedChanged += new System.EventHandler(this.Horizontal_CheckedChanged);
|
||||
//
|
||||
// actual
|
||||
//
|
||||
this.actual.AutoSize = true;
|
||||
this.actual.Location = new System.Drawing.Point(169, 48);
|
||||
this.actual.Name = "actual";
|
||||
this.actual.Size = new System.Drawing.Size(84, 13);
|
||||
this.actual.TabIndex = 6;
|
||||
this.actual.Text = "% of actual size";
|
||||
//
|
||||
// zoomSize
|
||||
//
|
||||
this.zoomSize.Location = new System.Drawing.Point(84, 44);
|
||||
this.zoomSize.Maximum = new decimal(new int[] {
|
||||
32767,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.zoomSize.Minimum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.zoomSize.Name = "zoomSize";
|
||||
this.zoomSize.Size = new System.Drawing.Size(78, 21);
|
||||
this.zoomSize.TabIndex = 5;
|
||||
this.zoomSize.Value = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
//
|
||||
// Direction
|
||||
//
|
||||
this.Direction.AutoSize = true;
|
||||
this.Direction.Location = new System.Drawing.Point(240, 20);
|
||||
this.Direction.Name = "Direction";
|
||||
this.Direction.Size = new System.Drawing.Size(53, 13);
|
||||
this.Direction.TabIndex = 2;
|
||||
this.Direction.Text = "Direction:";
|
||||
//
|
||||
// zoomOption
|
||||
//
|
||||
this.zoomOption.AutoSize = true;
|
||||
this.zoomOption.Location = new System.Drawing.Point(20, 46);
|
||||
this.zoomOption.Name = "zoomOption";
|
||||
this.zoomOption.Size = new System.Drawing.Size(64, 17);
|
||||
this.zoomOption.TabIndex = 1;
|
||||
this.zoomOption.TabStop = true;
|
||||
this.zoomOption.Text = "Zoom to";
|
||||
this.zoomOption.UseVisualStyleBackColor = true;
|
||||
this.zoomOption.CheckedChanged += new System.EventHandler(this.Zoom_CheckedChanged);
|
||||
//
|
||||
// fitToOption
|
||||
//
|
||||
this.fitToOption.AutoSize = true;
|
||||
this.fitToOption.Location = new System.Drawing.Point(20, 18);
|
||||
this.fitToOption.Name = "fitToOption";
|
||||
this.fitToOption.Size = new System.Drawing.Size(50, 17);
|
||||
this.fitToOption.TabIndex = 0;
|
||||
this.fitToOption.TabStop = true;
|
||||
this.fitToOption.Text = "Fit to";
|
||||
this.fitToOption.UseVisualStyleBackColor = true;
|
||||
this.fitToOption.CheckedChanged += new System.EventHandler(this.FitTo_CheckedChanged);
|
||||
//
|
||||
// formatGroupBox
|
||||
//
|
||||
this.formatGroupBox.Controls.Add(this.RIQCom);
|
||||
this.formatGroupBox.Controls.Add(this.noShadedCom);
|
||||
this.formatGroupBox.Controls.Add(this.label1);
|
||||
this.formatGroupBox.Controls.Add(this.Non);
|
||||
this.formatGroupBox.Controls.Add(this.shadedCom);
|
||||
this.formatGroupBox.Controls.Add(this.shaded);
|
||||
this.formatGroupBox.Location = new System.Drawing.Point(12, 211);
|
||||
this.formatGroupBox.Name = "formatGroupBox";
|
||||
this.formatGroupBox.Size = new System.Drawing.Size(489, 70);
|
||||
this.formatGroupBox.TabIndex = 4;
|
||||
this.formatGroupBox.TabStop = false;
|
||||
this.formatGroupBox.Text = "Format";
|
||||
//
|
||||
// RIQCom
|
||||
//
|
||||
this.RIQCom.FormattingEnabled = true;
|
||||
this.RIQCom.Location = new System.Drawing.Point(347, 32);
|
||||
this.RIQCom.Name = "RIQCom";
|
||||
this.RIQCom.Size = new System.Drawing.Size(121, 21);
|
||||
this.RIQCom.TabIndex = 10;
|
||||
//
|
||||
// noShadedCom
|
||||
//
|
||||
this.noShadedCom.FormattingEnabled = true;
|
||||
this.noShadedCom.Location = new System.Drawing.Point(180, 32);
|
||||
this.noShadedCom.Name = "noShadedCom";
|
||||
this.noShadedCom.Size = new System.Drawing.Size(121, 21);
|
||||
this.noShadedCom.TabIndex = 9;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(347, 16);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(109, 13);
|
||||
this.label1.TabIndex = 8;
|
||||
this.label1.Text = "Raster Image Quality";
|
||||
//
|
||||
// Non
|
||||
//
|
||||
this.Non.AutoSize = true;
|
||||
this.Non.Location = new System.Drawing.Point(180, 16);
|
||||
this.Non.Name = "Non";
|
||||
this.Non.Size = new System.Drawing.Size(98, 13);
|
||||
this.Non.TabIndex = 7;
|
||||
this.Non.Text = "Non shaded views:";
|
||||
//
|
||||
// shadedCom
|
||||
//
|
||||
this.shadedCom.FormattingEnabled = true;
|
||||
this.shadedCom.Location = new System.Drawing.Point(13, 32);
|
||||
this.shadedCom.Name = "shadedCom";
|
||||
this.shadedCom.Size = new System.Drawing.Size(121, 21);
|
||||
this.shadedCom.TabIndex = 6;
|
||||
//
|
||||
// shaded
|
||||
//
|
||||
this.shaded.AutoSize = true;
|
||||
this.shaded.Location = new System.Drawing.Point(13, 16);
|
||||
this.shaded.Name = "shaded";
|
||||
this.shaded.Size = new System.Drawing.Size(77, 13);
|
||||
this.shaded.TabIndex = 5;
|
||||
this.shaded.Text = "Shaded views:";
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.okButton.Location = new System.Drawing.Point(336, 307);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.okButton.TabIndex = 0;
|
||||
this.okButton.Text = "OK";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.OK_Click);
|
||||
//
|
||||
// cannelButton
|
||||
//
|
||||
this.cannelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cannelButton.Location = new System.Drawing.Point(426, 307);
|
||||
this.cannelButton.Name = "cannelButton";
|
||||
this.cannelButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.cannelButton.TabIndex = 5;
|
||||
this.cannelButton.Text = "Cannel";
|
||||
this.cannelButton.UseVisualStyleBackColor = true;
|
||||
this.cannelButton.Click += new System.EventHandler(this.Cannel_Click);
|
||||
//
|
||||
// ExportIMGOptionsForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(516, 341);
|
||||
this.Controls.Add(this.outputGroupBox);
|
||||
this.Controls.Add(this.cannelButton);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Controls.Add(this.formatGroupBox);
|
||||
this.Controls.Add(this.imageSizeGroupBox);
|
||||
this.Controls.Add(this.exportRangeGroupBox);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "ExportIMGOptionsForm";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.Text = "Export Image";
|
||||
this.outputGroupBox.ResumeLayout(false);
|
||||
this.outputGroupBox.PerformLayout();
|
||||
this.exportRangeGroupBox.ResumeLayout(false);
|
||||
this.exportRangeGroupBox.PerformLayout();
|
||||
this.imageSizeGroupBox.ResumeLayout(false);
|
||||
this.imageSizeGroupBox.PerformLayout();
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.zoomSize)).EndInit();
|
||||
this.formatGroupBox.ResumeLayout(false);
|
||||
this.formatGroupBox.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.GroupBox outputGroupBox;
|
||||
private System.Windows.Forms.Button changePath;
|
||||
private System.Windows.Forms.TextBox saveAs;
|
||||
private System.Windows.Forms.Label name;
|
||||
private System.Windows.Forms.GroupBox exportRangeGroupBox;
|
||||
private System.Windows.Forms.GroupBox imageSizeGroupBox;
|
||||
private System.Windows.Forms.GroupBox formatGroupBox;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.Button cannelButton;
|
||||
private System.Windows.Forms.RadioButton viewsSheetsOption;
|
||||
private System.Windows.Forms.RadioButton visiblePortionOption;
|
||||
private System.Windows.Forms.RadioButton currentWindowOption;
|
||||
private System.Windows.Forms.Button selectRange;
|
||||
private System.Windows.Forms.RadioButton fitToOption;
|
||||
private System.Windows.Forms.RadioButton horizontalOption;
|
||||
private System.Windows.Forms.RadioButton verticalOption;
|
||||
private System.Windows.Forms.Label Direction;
|
||||
private System.Windows.Forms.RadioButton zoomOption;
|
||||
private System.Windows.Forms.NumericUpDown zoomSize;
|
||||
private System.Windows.Forms.Label actual;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label Non;
|
||||
private System.Windows.Forms.ComboBox shadedCom;
|
||||
private System.Windows.Forms.Label shaded;
|
||||
private System.Windows.Forms.ComboBox noShadedCom;
|
||||
private System.Windows.Forms.ComboBox RIQCom;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.TextBox pixelValue;
|
||||
private System.Windows.Forms.Label pixels;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,249 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Provide a dialog which provides the options of lower priority information for exporting image
|
||||
/// </summary>
|
||||
public partial class ExportIMGOptionsForm : System.Windows.Forms.Form
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Data class object of m_exportOptions
|
||||
/// </summary>
|
||||
private ImageExportOptions m_exportOptions;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Data class object of ExportDataWithViews
|
||||
/// </summary>
|
||||
private ExportDataWithViews m_exportData;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="exportData">Data class object</param>
|
||||
public ExportIMGOptionsForm(ExportDataWithViews exportData)
|
||||
{
|
||||
m_exportOptions = new ImageExportOptions();
|
||||
InitializeComponent();
|
||||
this.m_exportData = exportData;
|
||||
InitializeFormats();
|
||||
}
|
||||
|
||||
private void InitializeFormats()
|
||||
{
|
||||
// Initialize
|
||||
currentWindowOption.Checked = true;
|
||||
selectRange.Enabled = false;
|
||||
fitToOption.Checked = true;
|
||||
zoomOption.Checked = false;
|
||||
verticalOption.Enabled = false;
|
||||
horizontalOption.Enabled = true;
|
||||
RIQCom.Enabled = false;
|
||||
pixelValue.Text = "512";
|
||||
zoomSize.Enabled = false;
|
||||
zoomSize.Value = 50;
|
||||
saveAs.Text = m_exportData.ExportFolder + "\\" + m_exportData.ActiveViewName;
|
||||
|
||||
|
||||
shadedCom.Items.Add("BMP");
|
||||
shadedCom.Items.Add("JPEG(lossless)");
|
||||
shadedCom.Items.Add("JPEG(medium)");
|
||||
shadedCom.Items.Add("JPEG(smallest)");
|
||||
shadedCom.Items.Add("PNG");
|
||||
shadedCom.Items.Add("TARGA");
|
||||
shadedCom.Items.Add("TIFF");
|
||||
shadedCom.SelectedIndex = 2;
|
||||
|
||||
noShadedCom.Items.Add("BMP");
|
||||
noShadedCom.Items.Add("JPEG(lossless)");
|
||||
noShadedCom.Items.Add("JPEG(medium)");
|
||||
noShadedCom.Items.Add("JPEG(smallest");
|
||||
noShadedCom.Items.Add("PNG");
|
||||
noShadedCom.Items.Add("TARGA");
|
||||
noShadedCom.Items.Add("TIFF");
|
||||
noShadedCom.SelectedIndex = 2;
|
||||
|
||||
|
||||
RIQCom.Items.Add("72");
|
||||
RIQCom.Items.Add("150");
|
||||
RIQCom.Items.Add("300");
|
||||
RIQCom.Items.Add("600");
|
||||
RIQCom.SelectedIndex = 0;
|
||||
RIQCom.Enabled = false;
|
||||
}
|
||||
|
||||
private void FitTo_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
verticalOption.Enabled = true;
|
||||
horizontalOption.Enabled = true;
|
||||
RIQCom.Enabled = false;
|
||||
zoomSize.Enabled = false;
|
||||
m_exportOptions.ZoomType = ZoomFitType.FitToPage;
|
||||
pixelValue.Enabled = true;
|
||||
}
|
||||
|
||||
private void Zoom_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
verticalOption.Checked = false;
|
||||
horizontalOption.Checked = false;
|
||||
verticalOption.Enabled = false;
|
||||
horizontalOption.Enabled = false;
|
||||
RIQCom.Enabled = true;
|
||||
zoomSize.Enabled = true;
|
||||
m_exportOptions.ZoomType = ZoomFitType.Zoom;
|
||||
pixelValue.Enabled = false;
|
||||
}
|
||||
|
||||
private void Cannel_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void Select_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (SelectViewsForm selectViewsForm = new SelectViewsForm(m_exportData.SelectViewsData))
|
||||
{
|
||||
m_exportData.SelectViewsData.SelectedViews.Clear();
|
||||
selectViewsForm.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
private void CurrentWindow_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
m_exportOptions.ExportRange = ExportRange.CurrentView;
|
||||
selectRange.Enabled = false;
|
||||
}
|
||||
|
||||
private void VisiblePortion_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
m_exportOptions.ExportRange = ExportRange.VisibleRegionOfCurrentView;
|
||||
selectRange.Enabled = false;
|
||||
}
|
||||
|
||||
private void ViewsSheets_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
m_exportOptions.ExportRange = ExportRange.SetOfViews;
|
||||
selectRange.Enabled = true;
|
||||
}
|
||||
|
||||
private void Change_Click(object sender, EventArgs e)
|
||||
{
|
||||
String fileName = String.Empty;
|
||||
int filterIndex = -1;
|
||||
DialogResult result = ShowSaveDialog(m_exportData, ref fileName, ref filterIndex);
|
||||
if (result != DialogResult.Cancel)
|
||||
{
|
||||
saveAs.Text = fileName.Substring(0, fileName.LastIndexOf("."));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private DialogResult ShowSaveDialog(ExportData exportData, ref String returnFileName, ref int filterIndex)
|
||||
{
|
||||
using (SaveFileDialog saveDialog = new SaveFileDialog())
|
||||
{
|
||||
saveDialog.Title = exportData.Title;
|
||||
saveDialog.InitialDirectory = exportData.ExportFolder;
|
||||
saveDialog.FileName = exportData.ActiveViewName;
|
||||
saveDialog.Filter = exportData.Filter;
|
||||
saveDialog.FilterIndex = 1;
|
||||
saveDialog.RestoreDirectory = true;
|
||||
|
||||
DialogResult result = saveDialog.ShowDialog();
|
||||
if (result != DialogResult.Cancel)
|
||||
{
|
||||
returnFileName = saveDialog.FileName;
|
||||
filterIndex = saveDialog.FilterIndex;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
private void OK_Click(object sender, EventArgs e)
|
||||
{
|
||||
m_exportOptions.FilePath = saveAs.Text;
|
||||
if (m_exportOptions.ZoomType == ZoomFitType.FitToPage)
|
||||
{
|
||||
m_exportOptions.PixelSize = int.Parse(pixelValue.Text);
|
||||
}
|
||||
else if (m_exportOptions.ZoomType == ZoomFitType.Zoom)
|
||||
{
|
||||
m_exportOptions.Zoom = (int)zoomSize.Value;
|
||||
m_exportOptions.ImageResolution = (ImageResolution)RIQCom.SelectedIndex;
|
||||
}
|
||||
|
||||
m_exportOptions.ShadowViewsFileType = (ImageFileType)shadedCom.SelectedIndex;
|
||||
m_exportOptions.HLRandWFViewsFileType = (ImageFileType)noShadedCom.SelectedIndex;
|
||||
|
||||
|
||||
if (m_exportOptions.ExportRange == ExportRange.SetOfViews)
|
||||
{
|
||||
ViewSet views = m_exportData.SelectViewsData.SelectedViews;
|
||||
List<ElementId> viewIds = new List<ElementId>();
|
||||
foreach (Autodesk.Revit.DB.View view in views)
|
||||
{
|
||||
viewIds.Add(view.Id);
|
||||
}
|
||||
m_exportOptions.SetViewsAndSheets(viewIds);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
m_exportData.ActiveDocument.ExportImage(m_exportOptions);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
String errorMessage = "Failed to export img" + ex.ToString();
|
||||
TaskDialog.Show("Error", errorMessage, TaskDialogCommonButtons.Ok);
|
||||
}
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void Vertical_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
m_exportOptions.FitDirection = FitDirectionType.Vertical;
|
||||
}
|
||||
|
||||
private void Horizontal_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
m_exportOptions.FitDirection = FitDirectionType.Horizontal;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,102 @@
|
||||
//
|
||||
// (C) Copyright 2003-2020 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Data class which stores the main information for exporting pdf format
|
||||
/// </summary>
|
||||
public class ExportPDFData : ExportDataWithViews
|
||||
{
|
||||
#region Class Member Variables
|
||||
private bool m_combine;
|
||||
#endregion
|
||||
|
||||
#region Class Properties
|
||||
public bool Combine
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_combine;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_combine = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="commandData">Revit command data</param>
|
||||
/// <param name="exportFormat">Format to export</param>
|
||||
public ExportPDFData(ExternalCommandData commandData, ExportFormat exportFormat)
|
||||
: base(commandData, exportFormat)
|
||||
{
|
||||
m_filter = "PDF Files |*.pdf";
|
||||
m_title = "Export PDF";
|
||||
|
||||
m_combine = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Export PDF format
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override bool Export()
|
||||
{
|
||||
base.Export();
|
||||
|
||||
bool exported = false;
|
||||
// Parameter: The list of view/sheet id to export
|
||||
IList<ElementId> views = new List<ElementId>();
|
||||
if (m_currentViewOnly)
|
||||
{
|
||||
views.Add(m_activeDoc.ActiveView.Id);
|
||||
}
|
||||
else
|
||||
{
|
||||
ViewSet viewSet = m_selectViewsData.SelectedViews;
|
||||
foreach (View v in viewSet)
|
||||
{
|
||||
views.Add(v.Id);
|
||||
}
|
||||
}
|
||||
|
||||
// Parameter: The exporting options, including paper size, orientation, file name or naming rule and etc.
|
||||
PDFExportOptions options = new PDFExportOptions();
|
||||
options.FileName = m_exportFileName;
|
||||
options.Combine = m_combine; // If not combined, PDFs will be exported with default naming rule "Type-ViewName"
|
||||
exported = m_activeDoc.Export(m_exportFolder, views, options);
|
||||
|
||||
return exported;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
partial class ExportPDFOptionsForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.buttonOK = new System.Windows.Forms.Button();
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.checkBoxCombineViews = new System.Windows.Forms.CheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// buttonOK
|
||||
//
|
||||
this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.buttonOK.Location = new System.Drawing.Point(120, 113);
|
||||
this.buttonOK.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.buttonOK.Name = "buttonOK";
|
||||
this.buttonOK.Size = new System.Drawing.Size(121, 28);
|
||||
this.buttonOK.TabIndex = 1;
|
||||
this.buttonOK.Text = "&OK";
|
||||
this.buttonOK.UseVisualStyleBackColor = true;
|
||||
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.buttonCancel.Location = new System.Drawing.Point(253, 113);
|
||||
this.buttonCancel.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.Size = new System.Drawing.Size(135, 28);
|
||||
this.buttonCancel.TabIndex = 3;
|
||||
this.buttonCancel.Text = "&Cancel";
|
||||
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxCombineViews
|
||||
//
|
||||
this.checkBoxCombineViews.AutoSize = true;
|
||||
this.checkBoxCombineViews.Location = new System.Drawing.Point(13, 34);
|
||||
this.checkBoxCombineViews.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.checkBoxCombineViews.Name = "checkBoxCombineViews";
|
||||
this.checkBoxCombineViews.Size = new System.Drawing.Size(375, 21);
|
||||
this.checkBoxCombineViews.TabIndex = 5;
|
||||
this.checkBoxCombineViews.Text = "Combine selected views and sheets into single PDF file";
|
||||
this.checkBoxCombineViews.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// ExportPDFOptionsForm
|
||||
//
|
||||
this.AcceptButton = this.buttonOK;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.buttonCancel;
|
||||
this.ClientSize = new System.Drawing.Size(411, 163);
|
||||
this.Controls.Add(this.checkBoxCombineViews);
|
||||
this.Controls.Add(this.buttonCancel);
|
||||
this.Controls.Add(this.buttonOK);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "ExportPDFOptionsForm";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "ExportPDFOptionsForm";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button buttonOK;
|
||||
private System.Windows.Forms.Button buttonCancel;
|
||||
private System.Windows.Forms.CheckBox checkBoxCombineViews;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Data class which stores information of lower priority for exporting PDF format.
|
||||
/// </summary>
|
||||
public partial class ExportPDFOptionsForm : Form
|
||||
{
|
||||
/// <summary>
|
||||
/// ExportPDFData object
|
||||
/// </summary>
|
||||
private ExportPDFData m_data;
|
||||
|
||||
public ExportPDFOptionsForm(ExportPDFData data)
|
||||
{
|
||||
m_data = data;
|
||||
InitializeComponent();
|
||||
Initialize();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialize controls
|
||||
/// </summary>
|
||||
private void Initialize()
|
||||
{
|
||||
checkBoxCombineViews.Checked = m_data.Combine;
|
||||
}
|
||||
|
||||
private void buttonOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
m_data.Combine = checkBoxCombineViews.Checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,170 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Reflection;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Data class which stores the main information for exporting dxf format
|
||||
/// </summary>
|
||||
public class ExportSATData : ExportDataWithViews
|
||||
{
|
||||
#region Class Member Variables
|
||||
/// <summary>
|
||||
/// String list of AutoCAD versions
|
||||
/// </summary>
|
||||
private List<String> m_fileVersion;
|
||||
|
||||
/// <summary>
|
||||
/// List of Autodesk.Revit.DB.ACADVersion defined in Revit
|
||||
/// </summary>
|
||||
private List<Autodesk.Revit.DB.ACADVersion> m_enumFileVersion;
|
||||
|
||||
/// <summary>
|
||||
/// File version option to export
|
||||
/// </summary>
|
||||
private Autodesk.Revit.DB.ACADVersion m_exportFileVersion;
|
||||
#endregion
|
||||
|
||||
#region Class Properties
|
||||
|
||||
/// <summary>
|
||||
/// String collection of AutoCAD versions
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<String> FileVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<String>(m_fileVersion);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Collection of Autodesk.Revit.DB.ACADVersion defined in Revit
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<Autodesk.Revit.DB.ACADVersion> EnumFileVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<Autodesk.Revit.DB.ACADVersion>(m_enumFileVersion);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// File version option to export
|
||||
/// </summary>
|
||||
public Autodesk.Revit.DB.ACADVersion ExportFileVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_exportFileVersion;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_exportFileVersion = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Class Member Methods
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="commandData">Revit command data</param>
|
||||
/// <param name="exportFormat">Format to export</param>
|
||||
public ExportSATData(ExternalCommandData commandData, ExportFormat exportFormat)
|
||||
: base(commandData, exportFormat)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the variables
|
||||
/// </summary>
|
||||
private void Initialize()
|
||||
{
|
||||
//AutoCAD versions
|
||||
m_fileVersion = new List<String>();
|
||||
m_enumFileVersion = new List<Autodesk.Revit.DB.ACADVersion>();
|
||||
m_fileVersion.Add("AutoCAD 2013 DXF Files (*.sat)");
|
||||
m_enumFileVersion.Add(Autodesk.Revit.DB.ACADVersion.R2013);
|
||||
m_fileVersion.Add("AutoCAD 2010 DXF Files (*.sat)");
|
||||
m_enumFileVersion.Add(Autodesk.Revit.DB.ACADVersion.R2010);
|
||||
m_fileVersion.Add("AutoCAD 2007 DXF Files (*.sat)");
|
||||
m_enumFileVersion.Add(Autodesk.Revit.DB.ACADVersion.R2007);
|
||||
|
||||
StringBuilder tmp = new StringBuilder();
|
||||
foreach (String version in m_fileVersion)
|
||||
{
|
||||
tmp.Append(version + "|*.sat|");
|
||||
}
|
||||
m_filter = tmp.ToString().TrimEnd('|');
|
||||
m_title = "Export SAT";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Collect the parameters and export
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override bool Export()
|
||||
{
|
||||
base.Export();
|
||||
|
||||
bool exported = false;
|
||||
|
||||
//parameter : ViewSet views
|
||||
ViewSet views = new ViewSet();
|
||||
if (m_currentViewOnly)
|
||||
{
|
||||
views.Insert(m_activeDoc.ActiveView);
|
||||
}
|
||||
else
|
||||
{
|
||||
views = m_selectViewsData.SelectedViews;
|
||||
}
|
||||
|
||||
ICollection<ElementId> viewIds = new List<ElementId>();
|
||||
foreach (View view in views)
|
||||
{
|
||||
viewIds.Add(view.Id);
|
||||
}
|
||||
|
||||
//parameter : DXFExportOptions dxfExportOptions
|
||||
SATExportOptions satExportOptions = new SATExportOptions();
|
||||
|
||||
//Export
|
||||
exported = m_activeDoc.Export(m_exportFolder, m_exportFileName, viewIds, satExportOptions);
|
||||
|
||||
return exported;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,213 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// It contains a dialog which provides the options of common information for export
|
||||
/// </summary>
|
||||
partial class ExportWithViewsForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.textBoxSaveAs = new System.Windows.Forms.TextBox();
|
||||
this.labelSaveAs = new System.Windows.Forms.Label();
|
||||
this.buttonSave = new System.Windows.Forms.Button();
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.buttonOptions = new System.Windows.Forms.Button();
|
||||
this.buttonBrowser = new System.Windows.Forms.Button();
|
||||
this.groupBoxRange = new System.Windows.Forms.GroupBox();
|
||||
this.buttonSelectViews = new System.Windows.Forms.Button();
|
||||
this.radioButtonSelectView = new System.Windows.Forms.RadioButton();
|
||||
this.radioButtonCurrentView = new System.Windows.Forms.RadioButton();
|
||||
this.groupBoxRange.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// textBoxSaveAs
|
||||
//
|
||||
this.textBoxSaveAs.Location = new System.Drawing.Point(67, 19);
|
||||
this.textBoxSaveAs.Name = "textBoxSaveAs";
|
||||
this.textBoxSaveAs.Size = new System.Drawing.Size(308, 21);
|
||||
this.textBoxSaveAs.TabIndex = 1;
|
||||
//
|
||||
// labelSaveAs
|
||||
//
|
||||
this.labelSaveAs.AutoSize = true;
|
||||
this.labelSaveAs.Location = new System.Drawing.Point(14, 23);
|
||||
this.labelSaveAs.Name = "labelSaveAs";
|
||||
this.labelSaveAs.Size = new System.Drawing.Size(50, 13);
|
||||
this.labelSaveAs.TabIndex = 1;
|
||||
this.labelSaveAs.Text = "Save As:";
|
||||
//
|
||||
// buttonSave
|
||||
//
|
||||
this.buttonSave.Location = new System.Drawing.Point(235, 141);
|
||||
this.buttonSave.Name = "buttonSave";
|
||||
this.buttonSave.Size = new System.Drawing.Size(75, 21);
|
||||
this.buttonSave.TabIndex = 0;
|
||||
this.buttonSave.Text = "&Save";
|
||||
this.buttonSave.UseVisualStyleBackColor = true;
|
||||
this.buttonSave.Click += new System.EventHandler(this.buttonSave_Click);
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.buttonCancel.Location = new System.Drawing.Point(320, 141);
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.Size = new System.Drawing.Size(75, 21);
|
||||
this.buttonCancel.TabIndex = 6;
|
||||
this.buttonCancel.Text = "&Cancel";
|
||||
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// buttonOptions
|
||||
//
|
||||
this.buttonOptions.Location = new System.Drawing.Point(150, 141);
|
||||
this.buttonOptions.Name = "buttonOptions";
|
||||
this.buttonOptions.Size = new System.Drawing.Size(75, 21);
|
||||
this.buttonOptions.TabIndex = 5;
|
||||
this.buttonOptions.Text = "&Options...";
|
||||
this.buttonOptions.UseVisualStyleBackColor = true;
|
||||
this.buttonOptions.Click += new System.EventHandler(this.buttonOptions_Click);
|
||||
//
|
||||
// buttonBrowser
|
||||
//
|
||||
this.buttonBrowser.Location = new System.Drawing.Point(375, 19);
|
||||
this.buttonBrowser.Name = "buttonBrowser";
|
||||
this.buttonBrowser.Size = new System.Drawing.Size(24, 20);
|
||||
this.buttonBrowser.TabIndex = 2;
|
||||
this.buttonBrowser.Text = "...";
|
||||
this.buttonBrowser.UseVisualStyleBackColor = true;
|
||||
this.buttonBrowser.Click += new System.EventHandler(this.buttonBrowser_Click);
|
||||
//
|
||||
// groupBoxRange
|
||||
//
|
||||
this.groupBoxRange.Controls.Add(this.buttonSelectViews);
|
||||
this.groupBoxRange.Controls.Add(this.radioButtonSelectView);
|
||||
this.groupBoxRange.Controls.Add(this.radioButtonCurrentView);
|
||||
this.groupBoxRange.Location = new System.Drawing.Point(17, 46);
|
||||
this.groupBoxRange.Name = "groupBoxRange";
|
||||
this.groupBoxRange.Size = new System.Drawing.Size(378, 73);
|
||||
this.groupBoxRange.TabIndex = 4;
|
||||
this.groupBoxRange.TabStop = false;
|
||||
this.groupBoxRange.Text = "Range";
|
||||
//
|
||||
// buttonSelectViews
|
||||
//
|
||||
this.buttonSelectViews.Enabled = false;
|
||||
this.buttonSelectViews.Location = new System.Drawing.Point(145, 42);
|
||||
this.buttonSelectViews.Name = "buttonSelectViews";
|
||||
this.buttonSelectViews.Size = new System.Drawing.Size(27, 21);
|
||||
this.buttonSelectViews.TabIndex = 2;
|
||||
this.buttonSelectViews.Text = "...";
|
||||
this.buttonSelectViews.UseVisualStyleBackColor = true;
|
||||
this.buttonSelectViews.Click += new System.EventHandler(this.buttonSelectViews_Click);
|
||||
//
|
||||
// radioButtonSelectView
|
||||
//
|
||||
this.radioButtonSelectView.AutoSize = true;
|
||||
this.radioButtonSelectView.Location = new System.Drawing.Point(9, 44);
|
||||
this.radioButtonSelectView.Name = "radioButtonSelectView";
|
||||
this.radioButtonSelectView.Size = new System.Drawing.Size(132, 17);
|
||||
this.radioButtonSelectView.TabIndex = 1;
|
||||
this.radioButtonSelectView.Text = "Selected views/sheets";
|
||||
this.radioButtonSelectView.UseVisualStyleBackColor = true;
|
||||
this.radioButtonSelectView.CheckedChanged += new System.EventHandler(this.radioButtonSelectView_CheckedChanged);
|
||||
//
|
||||
// radioButtonCurrentView
|
||||
//
|
||||
this.radioButtonCurrentView.AutoSize = true;
|
||||
this.radioButtonCurrentView.Checked = true;
|
||||
this.radioButtonCurrentView.Location = new System.Drawing.Point(9, 20);
|
||||
this.radioButtonCurrentView.Name = "radioButtonCurrentView";
|
||||
this.radioButtonCurrentView.Size = new System.Drawing.Size(87, 17);
|
||||
this.radioButtonCurrentView.TabIndex = 0;
|
||||
this.radioButtonCurrentView.TabStop = true;
|
||||
this.radioButtonCurrentView.Text = "Current view";
|
||||
this.radioButtonCurrentView.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// ExportWithViewsForm
|
||||
//
|
||||
this.AcceptButton = this.buttonSave;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.buttonCancel;
|
||||
this.ClientSize = new System.Drawing.Size(411, 169);
|
||||
this.Controls.Add(this.groupBoxRange);
|
||||
this.Controls.Add(this.buttonOptions);
|
||||
this.Controls.Add(this.buttonCancel);
|
||||
this.Controls.Add(this.buttonBrowser);
|
||||
this.Controls.Add(this.buttonSave);
|
||||
this.Controls.Add(this.labelSaveAs);
|
||||
this.Controls.Add(this.textBoxSaveAs);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "ExportWithViewsForm";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Export";
|
||||
this.groupBoxRange.ResumeLayout(false);
|
||||
this.groupBoxRange.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox textBoxSaveAs;
|
||||
private System.Windows.Forms.Label labelSaveAs;
|
||||
private System.Windows.Forms.Button buttonSave;
|
||||
private System.Windows.Forms.Button buttonCancel;
|
||||
private System.Windows.Forms.Button buttonOptions;
|
||||
private System.Windows.Forms.Button buttonBrowser;
|
||||
private System.Windows.Forms.GroupBox groupBoxRange;
|
||||
private System.Windows.Forms.Button buttonSelectViews;
|
||||
private System.Windows.Forms.RadioButton radioButtonSelectView;
|
||||
private System.Windows.Forms.RadioButton radioButtonCurrentView;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,304 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// It contains a dialog which provides the options of common information for export
|
||||
/// </summary>
|
||||
public partial class ExportWithViewsForm : System.Windows.Forms.Form
|
||||
{
|
||||
// Data class object of ExportDataWithViews
|
||||
private ExportDataWithViews m_exportData;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
public ExportWithViewsForm(ExportDataWithViews data)
|
||||
{
|
||||
m_exportData = data;
|
||||
InitializeComponent();
|
||||
InitializeControls();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialize values and status of controls
|
||||
/// </summary>
|
||||
private void InitializeControls()
|
||||
{
|
||||
textBoxSaveAs.Text = m_exportData.ExportFolder + "\\" + m_exportData.ExportFileName;
|
||||
|
||||
radioButtonCurrentView.Checked = true;
|
||||
|
||||
// Initialize the title
|
||||
this.Text = m_exportData.Title;
|
||||
if (m_exportData.ExportFormat == ExportFormat.SAT)
|
||||
{
|
||||
buttonOptions.Visible = false;
|
||||
}
|
||||
else if (m_exportData.ExportFormat == ExportFormat.Image)
|
||||
{
|
||||
this.Hide();
|
||||
ExportIMGData exportIMGData = m_exportData as ExportIMGData;
|
||||
using (ExportIMGOptionsForm exportOptionsForm = new ExportIMGOptionsForm(m_exportData))
|
||||
{
|
||||
exportOptionsForm.ShowDialog();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Provide the export option dialog
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void buttonOptions_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Export dwg
|
||||
if (m_exportData.ExportFormat == ExportFormat.DWG)
|
||||
{
|
||||
bool contain3DView = false;
|
||||
|
||||
if (radioButtonCurrentView.Checked)
|
||||
{
|
||||
if (m_exportData.Is3DView)
|
||||
{
|
||||
contain3DView = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_exportData.SelectViewsData.Contain3DView)
|
||||
{
|
||||
contain3DView = true;
|
||||
}
|
||||
}
|
||||
|
||||
ExportDWGData exportDWGData = m_exportData as ExportDWGData;
|
||||
using (ExportBaseOptionsForm exportOptionsForm = new ExportBaseOptionsForm(exportDWGData.ExportOptionsData,
|
||||
contain3DView, "DWG"))
|
||||
{
|
||||
exportOptionsForm.ShowDialog();
|
||||
}
|
||||
}
|
||||
//Export dxf
|
||||
else if (m_exportData.ExportFormat == ExportFormat.DXF)
|
||||
{
|
||||
bool contain3DView = false;
|
||||
|
||||
if (radioButtonCurrentView.Checked)
|
||||
{
|
||||
if (m_exportData.Is3DView)
|
||||
{
|
||||
contain3DView = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_exportData.SelectViewsData.Contain3DView)
|
||||
{
|
||||
contain3DView = true;
|
||||
}
|
||||
}
|
||||
|
||||
ExportDXFData exportDXFData = m_exportData as ExportDXFData;
|
||||
|
||||
using (ExportBaseOptionsForm exportOptionsForm = new ExportBaseOptionsForm(exportDXFData.ExportOptionsData,
|
||||
contain3DView, "DXF"))
|
||||
{
|
||||
exportOptionsForm.ShowDialog();
|
||||
}
|
||||
|
||||
}
|
||||
// Export dgn
|
||||
else if (m_exportData.ExportFormat == ExportFormat.DGN)
|
||||
{
|
||||
ExportDGNData exportDGNData = m_exportData as ExportDGNData;
|
||||
using (ExportDGNOptionsForm exportOptionsForm = new ExportDGNOptionsForm(exportDGNData))
|
||||
{
|
||||
exportOptionsForm.ShowDialog();
|
||||
}
|
||||
}
|
||||
// Export PDF
|
||||
else if (m_exportData.ExportFormat == ExportFormat.PDF)
|
||||
{
|
||||
ExportPDFData exportPDFData = m_exportData as ExportPDFData;
|
||||
using (ExportPDFOptionsForm exportOptionsForm = new ExportPDFOptionsForm(exportPDFData))
|
||||
{
|
||||
exportOptionsForm.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
// Export DWF
|
||||
else
|
||||
{
|
||||
ExportDWFData exportDWFData = m_exportData as ExportDWFData;
|
||||
using (ExportDWFOptionForm exportOptionsForm = new ExportDWFOptionForm(exportDWFData))
|
||||
{
|
||||
exportOptionsForm.ShowDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Provide the views selecting dialog
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void buttonSelectViews_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (SelectViewsForm selectViewsForm = new SelectViewsForm(m_exportData.SelectViewsData))
|
||||
{
|
||||
m_exportData.SelectViewsData.SelectedViews.Clear();
|
||||
selectViewsForm.ShowDialog();
|
||||
if (m_exportData.SelectViewsData.SelectedViews.Size == 0)
|
||||
{
|
||||
radioButtonCurrentView.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
radioButtonCurrentView.Checked = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specify a file to export into
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void buttonBrowser_Click(object sender, EventArgs e)
|
||||
{
|
||||
String fileName = String.Empty;
|
||||
int filterIndex = -1;
|
||||
|
||||
DialogResult result = MainData.ShowSaveDialog(m_exportData, ref fileName, ref filterIndex);
|
||||
if (result != DialogResult.Cancel)
|
||||
{
|
||||
textBoxSaveAs.Text = fileName;
|
||||
if (m_exportData.ExportFormat == ExportFormat.DWG)
|
||||
{
|
||||
ExportDWGData exportDWGData = m_exportData as ExportDWGData;
|
||||
exportDWGData.ExportFileVersion = exportDWGData.EnumFileVersion[filterIndex - 1];
|
||||
}
|
||||
else if (m_exportData.ExportFormat == ExportFormat.DXF)
|
||||
{
|
||||
ExportDXFData exportDXFData = m_exportData as ExportDXFData;
|
||||
exportDXFData.ExportFileVersion = exportDXFData.EnumFileVersion[filterIndex - 1];
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Change the status of buttonSelectViews according to the selection
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void radioButtonSelectView_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
buttonSelectViews.Enabled = radioButtonSelectView.Checked;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Transfer information back to ExportData class and execute EXPORT operation
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void buttonSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (ValidateExportFolder())
|
||||
{
|
||||
m_exportData.CurrentViewOnly = !radioButtonSelectView.Checked;
|
||||
|
||||
try
|
||||
{
|
||||
bool exported = m_exportData.Export();
|
||||
if (!exported)
|
||||
{
|
||||
TaskDialog.Show("Export", "This project cannot be exported to " + m_exportData.ExportFileName +
|
||||
" in current settings.", TaskDialogCommonButtons.Ok);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
TaskDialog.Show("Export Failed", ex.ToString(), TaskDialogCommonButtons.Ok);
|
||||
}
|
||||
|
||||
this.DialogResult = DialogResult.OK;
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check whether the folder specified is valid
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private Boolean ValidateExportFolder()
|
||||
{
|
||||
String fileNameFull = textBoxSaveAs.Text;
|
||||
//If the textBoxSaveAs is empty
|
||||
if (String.IsNullOrEmpty(fileNameFull))
|
||||
{
|
||||
TaskDialog.Show("Information", "Please specify the folder and file name!", TaskDialogCommonButtons.Ok);
|
||||
textBoxSaveAs.Focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
//If has file name
|
||||
if (!fileNameFull.Contains("\\"))
|
||||
{
|
||||
TaskDialog.Show("Information", "Please specify file name!", TaskDialogCommonButtons.Ok);
|
||||
textBoxSaveAs.Focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
//Whether the folder exists
|
||||
String folder = Path.GetDirectoryName(fileNameFull);
|
||||
if (!Directory.Exists(folder))
|
||||
{
|
||||
TaskDialog.Show("Information", "The specified folder does not exist!", TaskDialogCommonButtons.Ok);
|
||||
textBoxSaveAs.Focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
m_exportData.ExportFileName = Path.GetFileNameWithoutExtension(fileNameFull);
|
||||
m_exportData.ExportFolder = folder;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,172 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Data class which stores views information for export
|
||||
/// </summary>
|
||||
public class SelectViewsData
|
||||
{
|
||||
#region Class Member Variables
|
||||
/// <summary>
|
||||
/// Revit command data
|
||||
/// </summary>
|
||||
private ExternalCommandData m_commandData;
|
||||
|
||||
/// <summary>
|
||||
/// All printable views(except sheets)
|
||||
/// </summary>
|
||||
private ViewSet m_printableViews;
|
||||
|
||||
/// <summary>
|
||||
/// All printable sheets
|
||||
/// </summary>
|
||||
private ViewSet m_printableSheets;
|
||||
|
||||
/// <summary>
|
||||
/// All selected views in UI
|
||||
/// </summary>
|
||||
private ViewSet m_selectedViews;
|
||||
|
||||
/// <summary>
|
||||
/// Whether contain 3D view in selected views
|
||||
/// </summary>
|
||||
private bool m_contain3DView;
|
||||
#endregion
|
||||
|
||||
#region Class Properties
|
||||
/// <summary>
|
||||
/// All printable views(except sheets)
|
||||
/// </summary>
|
||||
public ViewSet PrintableViews
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_printableViews;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_printableViews = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// All printable sheets
|
||||
/// </summary>
|
||||
public ViewSet PrintableSheets
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_printableSheets;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_printableSheets = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// All selected views in UI
|
||||
/// </summary>
|
||||
public ViewSet SelectedViews
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_selectedViews;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_selectedViews = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether contain 3D view in selected views
|
||||
/// </summary>
|
||||
public bool Contain3DView
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_contain3DView;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_contain3DView = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="commandData"></param>
|
||||
public SelectViewsData(ExternalCommandData commandData)
|
||||
{
|
||||
m_commandData = commandData;
|
||||
m_printableViews = new ViewSet();
|
||||
m_printableSheets = new ViewSet();
|
||||
m_selectedViews = new ViewSet();
|
||||
|
||||
GetAllPrintableViews();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get all printable views and sheets
|
||||
/// </summary>
|
||||
private void GetAllPrintableViews()
|
||||
{
|
||||
FilteredElementCollector collector = new FilteredElementCollector(m_commandData.Application.ActiveUIDocument.Document);
|
||||
FilteredElementIterator itor = collector.OfClass(typeof(View)).GetElementIterator();
|
||||
itor.Reset();
|
||||
m_printableViews.Clear();
|
||||
m_printableSheets.Clear();
|
||||
|
||||
while (itor.MoveNext())
|
||||
{
|
||||
View view = itor.Current as View;
|
||||
// skip view templates because they're invisible in project browser, invalid for print
|
||||
if (null == view || view.IsTemplate || !view.CanBePrinted)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else if(view.ViewType == Autodesk.Revit.DB.ViewType.DrawingSheet)
|
||||
{
|
||||
m_printableSheets.Insert(view);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_printableViews.Insert(view);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,192 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Provide a dialog which lets users choose views to export.
|
||||
/// </summary>
|
||||
partial class SelectViewsForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.groupBoxShow = new System.Windows.Forms.GroupBox();
|
||||
this.checkBoxViews = new System.Windows.Forms.CheckBox();
|
||||
this.checkBoxSheets = new System.Windows.Forms.CheckBox();
|
||||
this.buttonCheckAll = new System.Windows.Forms.Button();
|
||||
this.buttonCheckNone = new System.Windows.Forms.Button();
|
||||
this.buttonOK = new System.Windows.Forms.Button();
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.checkedListBoxViews = new System.Windows.Forms.CheckedListBox();
|
||||
this.groupBoxShow.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// groupBoxShow
|
||||
//
|
||||
this.groupBoxShow.Controls.Add(this.checkBoxViews);
|
||||
this.groupBoxShow.Controls.Add(this.checkBoxSheets);
|
||||
this.groupBoxShow.Location = new System.Drawing.Point(12, 288);
|
||||
this.groupBoxShow.Name = "groupBoxShow";
|
||||
this.groupBoxShow.Size = new System.Drawing.Size(311, 41);
|
||||
this.groupBoxShow.TabIndex = 1;
|
||||
this.groupBoxShow.TabStop = false;
|
||||
this.groupBoxShow.Text = "Show";
|
||||
//
|
||||
// checkBoxViews
|
||||
//
|
||||
this.checkBoxViews.AutoSize = true;
|
||||
this.checkBoxViews.Checked = true;
|
||||
this.checkBoxViews.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.checkBoxViews.Location = new System.Drawing.Point(148, 18);
|
||||
this.checkBoxViews.Name = "checkBoxViews";
|
||||
this.checkBoxViews.Size = new System.Drawing.Size(54, 17);
|
||||
this.checkBoxViews.TabIndex = 1;
|
||||
this.checkBoxViews.Text = "Views";
|
||||
this.checkBoxViews.UseVisualStyleBackColor = true;
|
||||
this.checkBoxViews.CheckedChanged += new System.EventHandler(this.checkBoxViews_CheckedChanged);
|
||||
//
|
||||
// checkBoxSheets
|
||||
//
|
||||
this.checkBoxSheets.AutoSize = true;
|
||||
this.checkBoxSheets.Checked = true;
|
||||
this.checkBoxSheets.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.checkBoxSheets.Location = new System.Drawing.Point(7, 19);
|
||||
this.checkBoxSheets.Name = "checkBoxSheets";
|
||||
this.checkBoxSheets.Size = new System.Drawing.Size(59, 17);
|
||||
this.checkBoxSheets.TabIndex = 0;
|
||||
this.checkBoxSheets.Text = "Sheets";
|
||||
this.checkBoxSheets.UseVisualStyleBackColor = true;
|
||||
this.checkBoxSheets.CheckedChanged += new System.EventHandler(this.checkBoxSheets_CheckedChanged);
|
||||
//
|
||||
// buttonCheckAll
|
||||
//
|
||||
this.buttonCheckAll.Location = new System.Drawing.Point(333, 24);
|
||||
this.buttonCheckAll.Name = "buttonCheckAll";
|
||||
this.buttonCheckAll.Size = new System.Drawing.Size(85, 23);
|
||||
this.buttonCheckAll.TabIndex = 0;
|
||||
this.buttonCheckAll.Text = "Check &All";
|
||||
this.buttonCheckAll.UseVisualStyleBackColor = true;
|
||||
this.buttonCheckAll.Click += new System.EventHandler(this.buttonCheckAll_Click);
|
||||
//
|
||||
// buttonCheckNone
|
||||
//
|
||||
this.buttonCheckNone.Location = new System.Drawing.Point(333, 65);
|
||||
this.buttonCheckNone.Name = "buttonCheckNone";
|
||||
this.buttonCheckNone.Size = new System.Drawing.Size(85, 23);
|
||||
this.buttonCheckNone.TabIndex = 1;
|
||||
this.buttonCheckNone.Text = "Check &None";
|
||||
this.buttonCheckNone.UseVisualStyleBackColor = true;
|
||||
this.buttonCheckNone.Click += new System.EventHandler(this.buttonCheckNone_Click);
|
||||
//
|
||||
// buttonOK
|
||||
//
|
||||
this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.buttonOK.Location = new System.Drawing.Point(238, 361);
|
||||
this.buttonOK.Name = "buttonOK";
|
||||
this.buttonOK.Size = new System.Drawing.Size(85, 23);
|
||||
this.buttonOK.TabIndex = 2;
|
||||
this.buttonOK.Text = "&OK";
|
||||
this.buttonOK.UseVisualStyleBackColor = true;
|
||||
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.buttonCancel.Location = new System.Drawing.Point(333, 361);
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.Size = new System.Drawing.Size(85, 23);
|
||||
this.buttonCancel.TabIndex = 3;
|
||||
this.buttonCancel.Text = "&Cancel";
|
||||
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkedListBoxViews
|
||||
//
|
||||
this.checkedListBoxViews.CheckOnClick = true;
|
||||
this.checkedListBoxViews.FormattingEnabled = true;
|
||||
this.checkedListBoxViews.Location = new System.Drawing.Point(12, 12);
|
||||
this.checkedListBoxViews.Name = "checkedListBoxViews";
|
||||
this.checkedListBoxViews.Size = new System.Drawing.Size(311, 274);
|
||||
this.checkedListBoxViews.TabIndex = 3;
|
||||
//
|
||||
// SelectViewsForm
|
||||
//
|
||||
this.AcceptButton = this.buttonOK;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.buttonCancel;
|
||||
this.ClientSize = new System.Drawing.Size(432, 394);
|
||||
this.Controls.Add(this.checkedListBoxViews);
|
||||
this.Controls.Add(this.buttonCancel);
|
||||
this.Controls.Add(this.buttonOK);
|
||||
this.Controls.Add(this.buttonCheckNone);
|
||||
this.Controls.Add(this.buttonCheckAll);
|
||||
this.Controls.Add(this.groupBoxShow);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "SelectViewsForm";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "View/Sheet Set";
|
||||
this.groupBoxShow.ResumeLayout(false);
|
||||
this.groupBoxShow.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.GroupBox groupBoxShow;
|
||||
private System.Windows.Forms.CheckBox checkBoxViews;
|
||||
private System.Windows.Forms.CheckBox checkBoxSheets;
|
||||
private System.Windows.Forms.Button buttonCheckAll;
|
||||
private System.Windows.Forms.Button buttonCheckNone;
|
||||
private System.Windows.Forms.Button buttonOK;
|
||||
private System.Windows.Forms.Button buttonCancel;
|
||||
private System.Windows.Forms.CheckedListBox checkedListBoxViews;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,192 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Provide a dialog which lets users choose views to export.
|
||||
/// </summary>
|
||||
public partial class SelectViewsForm : System.Windows.Forms.Form
|
||||
{
|
||||
/// <summary>
|
||||
/// Data class
|
||||
/// </summary>
|
||||
private SelectViewsData m_selectViewsData;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="selectViewsData"></param>
|
||||
public SelectViewsForm(SelectViewsData selectViewsData)
|
||||
{
|
||||
InitializeComponent();
|
||||
m_selectViewsData = selectViewsData;
|
||||
InitializeControls();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialize values and status of controls
|
||||
/// </summary>
|
||||
void InitializeControls()
|
||||
{
|
||||
UpdateViews();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check all items
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void buttonCheckAll_Click(object sender, EventArgs e)
|
||||
{
|
||||
for(int i = 0; i < checkedListBoxViews.Items.Count; ++i)
|
||||
{
|
||||
checkedListBoxViews.SetItemChecked(i, true);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Un-check all items
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void buttonCheckNone_Click(object sender, EventArgs e)
|
||||
{
|
||||
for (int i = 0; i < checkedListBoxViews.Items.Count; ++i)
|
||||
{
|
||||
checkedListBoxViews.SetItemChecked(i, false);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether to show the sheets
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void checkBoxSheets_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
UpdateViews();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether to show the views (except sheets)
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void checkBoxViews_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
UpdateViews();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update the views in the checked list box
|
||||
/// </summary>
|
||||
private void UpdateViews()
|
||||
{
|
||||
checkedListBoxViews.Items.Clear();
|
||||
if (checkBoxViews.Checked)
|
||||
{
|
||||
foreach (Autodesk.Revit.DB.View view in m_selectViewsData.PrintableViews)
|
||||
{
|
||||
checkedListBoxViews.Items.Add(view.ViewType.ToString() + ": " + view.Name);
|
||||
}
|
||||
}
|
||||
|
||||
if (checkBoxSheets.Checked)
|
||||
{
|
||||
foreach (Autodesk.Revit.DB.ViewSheet viewSheet in m_selectViewsData.PrintableSheets)
|
||||
{
|
||||
checkedListBoxViews.Items.Add("Drawing Sheet: " + viewSheet.SheetNumber + " - " +
|
||||
viewSheet.Name);
|
||||
}
|
||||
}
|
||||
checkedListBoxViews.Sorted = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OK button clicked
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void buttonOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
GetSelectedViews();
|
||||
this.Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Transfer information back to SelectViewsData class
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private void GetSelectedViews()
|
||||
{
|
||||
m_selectViewsData.Contain3DView = false;
|
||||
|
||||
foreach(int index in checkedListBoxViews.CheckedIndices)
|
||||
{
|
||||
String text = checkedListBoxViews.Items[index].ToString();
|
||||
String sheetPrefix = "Drawing Sheet: ";
|
||||
if (text.StartsWith(sheetPrefix))
|
||||
{
|
||||
text = text.Substring(sheetPrefix.Length);
|
||||
String sheetNumber;
|
||||
String sheetViewName;
|
||||
sheetNumber = text.Substring(0, text.IndexOf(" - "));
|
||||
sheetViewName = text.Substring(text.IndexOf(" - ") + 3);
|
||||
foreach(Autodesk.Revit.DB.ViewSheet viewSheet in m_selectViewsData.PrintableSheets)
|
||||
{
|
||||
if(viewSheet.SheetNumber == sheetNumber && viewSheet.Name == sheetViewName)
|
||||
{
|
||||
m_selectViewsData.SelectedViews.Insert(viewSheet);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
String viewType = text.Substring(0, text.IndexOf(": "));
|
||||
String viewName = text.Substring(text.IndexOf(": ") + 2);
|
||||
foreach (Autodesk.Revit.DB.View view in m_selectViewsData.PrintableViews)
|
||||
{
|
||||
Autodesk.Revit.DB.ViewType vt = view.ViewType;
|
||||
if(viewType == vt.ToString() && viewName == view.Name)
|
||||
{
|
||||
m_selectViewsData.SelectedViews.Insert(view);
|
||||
if (vt == Autodesk.Revit.DB.ViewType.ThreeD)
|
||||
{
|
||||
m_selectViewsData.Contain3DView = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,630 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Data class which stores the information for importing dwg format
|
||||
/// </summary>
|
||||
public class ImportDWGData : ImportData
|
||||
{
|
||||
#region Class Member Variables
|
||||
/// <summary>
|
||||
/// ThisViewOnly
|
||||
/// </summary>
|
||||
private bool m_importThisViewOnly;
|
||||
|
||||
/// <summary>
|
||||
/// All views
|
||||
/// </summary>
|
||||
private ViewSet m_views;
|
||||
|
||||
/// <summary>
|
||||
/// Import view
|
||||
/// </summary>
|
||||
private View m_importView;
|
||||
|
||||
/// <summary>
|
||||
/// ColorMode for import
|
||||
/// </summary>
|
||||
private List<String> m_colorMode;
|
||||
|
||||
/// <summary>
|
||||
/// All available import color modes
|
||||
/// </summary>
|
||||
private List<Autodesk.Revit.DB.ImportColorMode> m_enumColorMode;
|
||||
|
||||
/// <summary>
|
||||
/// Import color mode
|
||||
/// </summary>
|
||||
private Autodesk.Revit.DB.ImportColorMode m_importColorMode;
|
||||
|
||||
/// <summary>
|
||||
/// Custom scale for import
|
||||
/// </summary>
|
||||
private double m_importCustomScale;
|
||||
|
||||
/// <summary>
|
||||
/// OrientToView
|
||||
/// </summary>
|
||||
private bool m_importOrientToView;
|
||||
|
||||
/// <summary>
|
||||
/// Placement
|
||||
/// </summary>
|
||||
private List<String> m_placement;
|
||||
|
||||
/// <summary>
|
||||
/// All placement for layers to be imported
|
||||
/// </summary>
|
||||
private List<Autodesk.Revit.DB.ImportPlacement> m_enumPlacement;
|
||||
|
||||
/// <summary>
|
||||
/// Placement for import
|
||||
/// </summary>
|
||||
private Autodesk.Revit.DB.ImportPlacement m_importPlacement;
|
||||
|
||||
/// <summary>
|
||||
/// All units for layer to be imported
|
||||
/// </summary>
|
||||
private List<String> m_unit;
|
||||
|
||||
/// <summary>
|
||||
/// All import unit for import layers
|
||||
/// </summary>
|
||||
private List<Autodesk.Revit.DB.ImportUnit> m_enumUnit;
|
||||
|
||||
/// <summary>
|
||||
/// Import unit
|
||||
/// </summary>
|
||||
private Autodesk.Revit.DB.ImportUnit m_importUnit;
|
||||
|
||||
/// <summary>
|
||||
/// All available layers only
|
||||
/// </summary>
|
||||
private List<String> m_visibleLayersOnly;
|
||||
|
||||
/// <summary>
|
||||
/// All boolean values for available visible layers
|
||||
/// </summary>
|
||||
private List<bool> m_enumVisibleLayersOnly;
|
||||
|
||||
/// <summary>
|
||||
/// Whether import visible layer only
|
||||
/// </summary>
|
||||
private bool m_importVisibleLayersOnly;
|
||||
|
||||
/// <summary>
|
||||
/// Whether active view is 3D
|
||||
/// </summary>
|
||||
private bool m_is3DView;
|
||||
#endregion
|
||||
|
||||
|
||||
#region Class Properties
|
||||
/// <summary>
|
||||
/// Get or set whether import this view only
|
||||
/// </summary>
|
||||
public bool ImportThisViewOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_importThisViewOnly;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_importThisViewOnly = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// all views for import
|
||||
/// </summary>
|
||||
public ViewSet Views
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_views;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_views = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Import view
|
||||
/// </summary>
|
||||
public View ImportView
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_importView;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_importView = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// All available color modes for import
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<String> ColorMode
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<String>(m_colorMode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// All available import color modes
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<Autodesk.Revit.DB.ImportColorMode> EnumColorMode
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<Autodesk.Revit.DB.ImportColorMode>(m_enumColorMode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Import color mode
|
||||
/// </summary>
|
||||
public Autodesk.Revit.DB.ImportColorMode ImportColorMode
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_importColorMode;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_importColorMode = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Custom scale for import
|
||||
/// </summary>
|
||||
public double ImportCustomScale
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_importCustomScale;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_importCustomScale = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Whether import orient to view
|
||||
/// </summary>
|
||||
public bool ImportOrientToView
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_importOrientToView;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_importOrientToView = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// All placement for layers to be imported
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<String> Placement
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<String>(m_placement);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// All ImportPlacements for all layers to be imported
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<Autodesk.Revit.DB.ImportPlacement> EnumPlacement
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<Autodesk.Revit.DB.ImportPlacement>(m_enumPlacement);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Import placement for import
|
||||
/// </summary>
|
||||
public Autodesk.Revit.DB.ImportPlacement ImportPlacement
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_importPlacement;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_importPlacement = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// All units for layer to be imported
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<String> Unit
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<string>(m_unit);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// All import unit for import layers
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<Autodesk.Revit.DB.ImportUnit> EnumUnit
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<Autodesk.Revit.DB.ImportUnit>(m_enumUnit);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Get or set import unit
|
||||
/// </summary>
|
||||
public Autodesk.Revit.DB.ImportUnit ImportUnit
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_importUnit;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_importUnit = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// All available layers only
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<String> VisibleLayersOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<String>(m_visibleLayersOnly);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// All boolean values for available visible layers
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<bool> EnumVisibleLayersOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<bool>(m_enumVisibleLayersOnly);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Whether import visible layer only
|
||||
/// </summary>
|
||||
public bool ImportVisibleLayersOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_importVisibleLayersOnly;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_importVisibleLayersOnly = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether active view is 3D
|
||||
/// </summary>
|
||||
public bool Is3DView
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_is3DView;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_is3DView = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region Class Member Methods
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="commandData">Revit command data</param>
|
||||
/// <param name="format">Format to import</param>
|
||||
public ImportDWGData(ExternalCommandData commandData, ImportFormat format)
|
||||
: base(commandData, format)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Collect the parameters and export
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override bool Import()
|
||||
{
|
||||
bool imported = false;
|
||||
|
||||
//parameter: DWGImportOptions
|
||||
DWGImportOptions dwgImportOption = new DWGImportOptions();
|
||||
dwgImportOption.ColorMode = m_importColorMode;
|
||||
dwgImportOption.CustomScale = m_importCustomScale;
|
||||
dwgImportOption.OrientToView = m_importOrientToView;
|
||||
dwgImportOption.Placement = m_importPlacement;
|
||||
dwgImportOption.ThisViewOnly = m_importThisViewOnly;
|
||||
View view = null;
|
||||
if (!m_importThisViewOnly)
|
||||
{
|
||||
view = m_importView;
|
||||
}
|
||||
else
|
||||
{
|
||||
view = m_activeDoc.ActiveView;
|
||||
}
|
||||
dwgImportOption.Unit = m_importUnit;
|
||||
dwgImportOption.VisibleLayersOnly = m_importVisibleLayersOnly;
|
||||
|
||||
//parameter: ElementId
|
||||
ElementId elementId = null;
|
||||
|
||||
//Import
|
||||
Transaction t = new Transaction(m_activeDoc);
|
||||
t.SetName("Import");
|
||||
t.Start();
|
||||
imported = m_activeDoc.Import(m_importFileFullName, dwgImportOption, view, out elementId);
|
||||
t.Commit();
|
||||
|
||||
return imported;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region Class Implementation
|
||||
/// <summary>
|
||||
/// Initialize the variables
|
||||
/// </summary>
|
||||
private void Initialize()
|
||||
{
|
||||
//ColorMode
|
||||
m_colorMode = new List<String>();
|
||||
m_enumColorMode = new List<Autodesk.Revit.DB.ImportColorMode>();
|
||||
m_colorMode.Add("Black and white");
|
||||
m_enumColorMode.Add(Autodesk.Revit.DB.ImportColorMode.BlackAndWhite);
|
||||
m_colorMode.Add("Preserve colors");
|
||||
m_enumColorMode.Add(Autodesk.Revit.DB.ImportColorMode.Preserved);
|
||||
m_colorMode.Add("Invert colors");
|
||||
m_enumColorMode.Add(Autodesk.Revit.DB.ImportColorMode.Inverted);
|
||||
|
||||
//Placement
|
||||
m_placement = new List<String>();
|
||||
m_enumPlacement = new List<Autodesk.Revit.DB.ImportPlacement>();
|
||||
m_placement.Add("Center-to-center");
|
||||
m_enumPlacement.Add(Autodesk.Revit.DB.ImportPlacement.Centered);
|
||||
m_placement.Add("Origin-to-origin");
|
||||
m_enumPlacement.Add(Autodesk.Revit.DB.ImportPlacement.Origin);
|
||||
|
||||
//Unit
|
||||
m_unit = new List<String>();
|
||||
m_enumUnit = new List<Autodesk.Revit.DB.ImportUnit>();
|
||||
m_unit.Add("Auto-Detect");
|
||||
m_enumUnit.Add(Autodesk.Revit.DB.ImportUnit.Default);
|
||||
m_unit.Add(Autodesk.Revit.DB.ImportUnit.Foot.ToString());
|
||||
m_enumUnit.Add(Autodesk.Revit.DB.ImportUnit.Foot);
|
||||
m_unit.Add(Autodesk.Revit.DB.ImportUnit.Inch.ToString());
|
||||
m_enumUnit.Add(Autodesk.Revit.DB.ImportUnit.Inch);
|
||||
m_unit.Add(Autodesk.Revit.DB.ImportUnit.Meter.ToString());
|
||||
m_enumUnit.Add(Autodesk.Revit.DB.ImportUnit.Meter);
|
||||
m_unit.Add(Autodesk.Revit.DB.ImportUnit.Decimeter.ToString());
|
||||
m_enumUnit.Add(Autodesk.Revit.DB.ImportUnit.Decimeter);
|
||||
m_unit.Add(Autodesk.Revit.DB.ImportUnit.Centimeter.ToString());
|
||||
m_enumUnit.Add(Autodesk.Revit.DB.ImportUnit.Centimeter);
|
||||
m_unit.Add(Autodesk.Revit.DB.ImportUnit.Millimeter.ToString());
|
||||
m_enumUnit.Add(Autodesk.Revit.DB.ImportUnit.Millimeter);
|
||||
m_unit.Add("Custom");
|
||||
m_enumUnit.Add(Autodesk.Revit.DB.ImportUnit.Default);
|
||||
|
||||
//VisibleLayersOnly
|
||||
m_visibleLayersOnly = new List<String>();
|
||||
m_enumVisibleLayersOnly = new List<bool>();
|
||||
m_visibleLayersOnly.Add("All");
|
||||
m_enumVisibleLayersOnly.Add(false);
|
||||
m_visibleLayersOnly.Add("Visible");
|
||||
m_enumVisibleLayersOnly.Add(true);
|
||||
|
||||
//Whether active view is 3D
|
||||
m_is3DView = false;
|
||||
if (m_activeDoc.ActiveView.ViewType == Autodesk.Revit.DB.ViewType.ThreeD)
|
||||
{
|
||||
m_is3DView = true;
|
||||
}
|
||||
|
||||
//Views
|
||||
m_views = new ViewSet();
|
||||
GetViews();
|
||||
|
||||
m_importCustomScale = 0.0;
|
||||
m_importOrientToView = true;
|
||||
m_importUnit = Autodesk.Revit.DB.ImportUnit.Default;
|
||||
m_importThisViewOnly = false;
|
||||
m_importView = m_activeDoc.ActiveView;
|
||||
m_importColorMode = Autodesk.Revit.DB.ImportColorMode.Inverted;
|
||||
m_importPlacement = Autodesk.Revit.DB.ImportPlacement.Centered;
|
||||
m_importVisibleLayersOnly = false;
|
||||
|
||||
m_filter = "DWG Files (*.dwg)|*.dwg";
|
||||
m_title = "Import DWG";
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Get all the views to be displayed
|
||||
/// </summary>
|
||||
private void GetViews()
|
||||
{
|
||||
FilteredElementCollector collector = new FilteredElementCollector(m_activeDoc);
|
||||
FilteredElementIterator itor = collector.OfClass(typeof(View)).GetElementIterator();
|
||||
itor.Reset();
|
||||
ViewSet views = new ViewSet();
|
||||
ViewSet floorPlans = new ViewSet();
|
||||
ViewSet ceilingPlans = new ViewSet();
|
||||
ViewSet engineeringPlans = new ViewSet();
|
||||
while (itor.MoveNext())
|
||||
{
|
||||
View view = itor.Current as View;
|
||||
// skip view templates because they're invalid for import/export
|
||||
if (view == null || view.IsTemplate)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else if (view.ViewType == Autodesk.Revit.DB.ViewType.FloorPlan)
|
||||
{
|
||||
floorPlans.Insert(view);
|
||||
}
|
||||
else if (view.ViewType == Autodesk.Revit.DB.ViewType.CeilingPlan)
|
||||
{
|
||||
ceilingPlans.Insert(view);
|
||||
}
|
||||
else if (view.ViewType == Autodesk.Revit.DB.ViewType.EngineeringPlan)
|
||||
{
|
||||
engineeringPlans.Insert(view);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (View floorPlan in floorPlans)
|
||||
{
|
||||
foreach (View ceilingPlan in ceilingPlans)
|
||||
{
|
||||
if (floorPlan.Name == ceilingPlan.Name)
|
||||
{
|
||||
views.Insert(floorPlan);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (View engineeringPlan in engineeringPlans)
|
||||
{
|
||||
if (engineeringPlan.Name == engineeringPlan.GenLevel.Name)
|
||||
{
|
||||
views.Insert(engineeringPlan);
|
||||
}
|
||||
}
|
||||
|
||||
View activeView = m_activeDoc.ActiveView;
|
||||
Autodesk.Revit.DB.ViewType viewType = activeView.ViewType;
|
||||
if (viewType == Autodesk.Revit.DB.ViewType.FloorPlan ||
|
||||
viewType == Autodesk.Revit.DB.ViewType.CeilingPlan)
|
||||
{
|
||||
m_views.Insert(activeView);
|
||||
foreach (View view in views)
|
||||
{
|
||||
if (view.GenLevel.Elevation < activeView.GenLevel.Elevation)
|
||||
{
|
||||
m_views.Insert(view);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (viewType == Autodesk.Revit.DB.ViewType.EngineeringPlan)
|
||||
{
|
||||
if (views.Contains(activeView))
|
||||
{
|
||||
m_views.Insert(activeView);
|
||||
}
|
||||
foreach (View view in views)
|
||||
{
|
||||
if (view.GenLevel.Elevation < activeView.GenLevel.Elevation)
|
||||
{
|
||||
m_views.Insert(view);
|
||||
}
|
||||
}
|
||||
}
|
||||
else//Get view of the lowest elevation
|
||||
{
|
||||
int i = 0;
|
||||
double elevation = 0;
|
||||
View viewLowestElevation = null;
|
||||
foreach (View view in views)
|
||||
{
|
||||
if (i == 0)
|
||||
{
|
||||
elevation = view.GenLevel.Elevation;
|
||||
viewLowestElevation = view;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (view.GenLevel.Elevation <= elevation)
|
||||
{
|
||||
elevation = view.GenLevel.Elevation;
|
||||
viewLowestElevation = view;
|
||||
}
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
m_views.Insert(viewLowestElevation);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,397 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// It contains a dialog which provides the options of import
|
||||
/// </summary>
|
||||
partial class ImportDWGForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.buttonOpen = new System.Windows.Forms.Button();
|
||||
this.labelFileName = new System.Windows.Forms.Label();
|
||||
this.textBoxFileSource = new System.Windows.Forms.TextBox();
|
||||
this.buttonBrowser = new System.Windows.Forms.Button();
|
||||
this.groupBoxPositioning = new System.Windows.Forms.GroupBox();
|
||||
this.labelAutomaticallyPlace = new System.Windows.Forms.Label();
|
||||
this.labelPlaceLevel = new System.Windows.Forms.Label();
|
||||
this.radioButtonOrigin2Origin = new System.Windows.Forms.RadioButton();
|
||||
this.radioButtonCenter2Center = new System.Windows.Forms.RadioButton();
|
||||
this.comboBoxLevel = new System.Windows.Forms.ComboBox();
|
||||
this.checkBoxOrient2View = new System.Windows.Forms.CheckBox();
|
||||
this.groupBoxScaling = new System.Windows.Forms.GroupBox();
|
||||
this.comboBoxUnits = new System.Windows.Forms.ComboBox();
|
||||
this.textBoxScale = new System.Windows.Forms.TextBox();
|
||||
this.labelScaleFactor = new System.Windows.Forms.Label();
|
||||
this.labelUnits = new System.Windows.Forms.Label();
|
||||
this.groupBoxColors = new System.Windows.Forms.GroupBox();
|
||||
this.radioButtonInvertColor = new System.Windows.Forms.RadioButton();
|
||||
this.radioButtonPreserve = new System.Windows.Forms.RadioButton();
|
||||
this.radioButtonBlackWhite = new System.Windows.Forms.RadioButton();
|
||||
this.checkBoxCurrentViewOnly = new System.Windows.Forms.CheckBox();
|
||||
this.comboBoxLayers = new System.Windows.Forms.ComboBox();
|
||||
this.labelLayers = new System.Windows.Forms.Label();
|
||||
this.groupBoxPositioning.SuspendLayout();
|
||||
this.groupBoxScaling.SuspendLayout();
|
||||
this.groupBoxColors.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.buttonCancel.Location = new System.Drawing.Point(390, 285);
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.Size = new System.Drawing.Size(75, 21);
|
||||
this.buttonCancel.TabIndex = 8;
|
||||
this.buttonCancel.Text = "&Cancel";
|
||||
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// buttonOpen
|
||||
//
|
||||
this.buttonOpen.Location = new System.Drawing.Point(303, 285);
|
||||
this.buttonOpen.Name = "buttonOpen";
|
||||
this.buttonOpen.Size = new System.Drawing.Size(75, 21);
|
||||
this.buttonOpen.TabIndex = 7;
|
||||
this.buttonOpen.Text = "&Open";
|
||||
this.buttonOpen.UseVisualStyleBackColor = true;
|
||||
this.buttonOpen.Click += new System.EventHandler(this.buttonOpen_Click);
|
||||
//
|
||||
// labelFileName
|
||||
//
|
||||
this.labelFileName.AutoSize = true;
|
||||
this.labelFileName.Location = new System.Drawing.Point(10, 15);
|
||||
this.labelFileName.Name = "labelFileName";
|
||||
this.labelFileName.Size = new System.Drawing.Size(61, 13);
|
||||
this.labelFileName.TabIndex = 10;
|
||||
this.labelFileName.Text = "File source:";
|
||||
//
|
||||
// textBoxFileSource
|
||||
//
|
||||
this.textBoxFileSource.Location = new System.Drawing.Point(73, 11);
|
||||
this.textBoxFileSource.Name = "textBoxFileSource";
|
||||
this.textBoxFileSource.Size = new System.Drawing.Size(369, 20);
|
||||
this.textBoxFileSource.TabIndex = 1;
|
||||
//
|
||||
// buttonBrowser
|
||||
//
|
||||
this.buttonBrowser.Location = new System.Drawing.Point(442, 11);
|
||||
this.buttonBrowser.Name = "buttonBrowser";
|
||||
this.buttonBrowser.Size = new System.Drawing.Size(24, 20);
|
||||
this.buttonBrowser.TabIndex = 0;
|
||||
this.buttonBrowser.Text = "...";
|
||||
this.buttonBrowser.UseVisualStyleBackColor = true;
|
||||
this.buttonBrowser.Click += new System.EventHandler(this.buttonBrowser_Click);
|
||||
//
|
||||
// groupBoxPositioning
|
||||
//
|
||||
this.groupBoxPositioning.Controls.Add(this.labelAutomaticallyPlace);
|
||||
this.groupBoxPositioning.Controls.Add(this.labelPlaceLevel);
|
||||
this.groupBoxPositioning.Controls.Add(this.radioButtonOrigin2Origin);
|
||||
this.groupBoxPositioning.Controls.Add(this.radioButtonCenter2Center);
|
||||
this.groupBoxPositioning.Controls.Add(this.comboBoxLevel);
|
||||
this.groupBoxPositioning.Controls.Add(this.checkBoxOrient2View);
|
||||
this.groupBoxPositioning.Location = new System.Drawing.Point(229, 43);
|
||||
this.groupBoxPositioning.Name = "groupBoxPositioning";
|
||||
this.groupBoxPositioning.Size = new System.Drawing.Size(237, 157);
|
||||
this.groupBoxPositioning.TabIndex = 5;
|
||||
this.groupBoxPositioning.TabStop = false;
|
||||
this.groupBoxPositioning.Text = "Positioning";
|
||||
//
|
||||
// labelAutomaticallyPlace
|
||||
//
|
||||
this.labelAutomaticallyPlace.AutoSize = true;
|
||||
this.labelAutomaticallyPlace.Location = new System.Drawing.Point(15, 18);
|
||||
this.labelAutomaticallyPlace.Name = "labelAutomaticallyPlace";
|
||||
this.labelAutomaticallyPlace.Size = new System.Drawing.Size(98, 13);
|
||||
this.labelAutomaticallyPlace.TabIndex = 0;
|
||||
this.labelAutomaticallyPlace.Text = "Automatically place";
|
||||
//
|
||||
// labelPlaceLevel
|
||||
//
|
||||
this.labelPlaceLevel.AutoSize = true;
|
||||
this.labelPlaceLevel.Location = new System.Drawing.Point(14, 129);
|
||||
this.labelPlaceLevel.Name = "labelPlaceLevel";
|
||||
this.labelPlaceLevel.Size = new System.Drawing.Size(74, 13);
|
||||
this.labelPlaceLevel.TabIndex = 5;
|
||||
this.labelPlaceLevel.Text = "Place at level:";
|
||||
//
|
||||
// radioButtonOrigin2Origin
|
||||
//
|
||||
this.radioButtonOrigin2Origin.AutoSize = true;
|
||||
this.radioButtonOrigin2Origin.Location = new System.Drawing.Point(19, 60);
|
||||
this.radioButtonOrigin2Origin.Name = "radioButtonOrigin2Origin";
|
||||
this.radioButtonOrigin2Origin.Size = new System.Drawing.Size(92, 17);
|
||||
this.radioButtonOrigin2Origin.TabIndex = 2;
|
||||
this.radioButtonOrigin2Origin.TabStop = true;
|
||||
this.radioButtonOrigin2Origin.Text = "Origin-to-origin";
|
||||
this.radioButtonOrigin2Origin.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radioButtonCenter2Center
|
||||
//
|
||||
this.radioButtonCenter2Center.AutoSize = true;
|
||||
this.radioButtonCenter2Center.Checked = true;
|
||||
this.radioButtonCenter2Center.Location = new System.Drawing.Point(19, 37);
|
||||
this.radioButtonCenter2Center.Name = "radioButtonCenter2Center";
|
||||
this.radioButtonCenter2Center.Size = new System.Drawing.Size(101, 17);
|
||||
this.radioButtonCenter2Center.TabIndex = 1;
|
||||
this.radioButtonCenter2Center.TabStop = true;
|
||||
this.radioButtonCenter2Center.Text = "Center-to-center";
|
||||
this.radioButtonCenter2Center.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// comboBoxLevel
|
||||
//
|
||||
this.comboBoxLevel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBoxLevel.FormattingEnabled = true;
|
||||
this.comboBoxLevel.Location = new System.Drawing.Point(91, 125);
|
||||
this.comboBoxLevel.Name = "comboBoxLevel";
|
||||
this.comboBoxLevel.Size = new System.Drawing.Size(122, 21);
|
||||
this.comboBoxLevel.TabIndex = 4;
|
||||
//
|
||||
// checkBoxOrient2View
|
||||
//
|
||||
this.checkBoxOrient2View.AutoSize = true;
|
||||
this.checkBoxOrient2View.Checked = true;
|
||||
this.checkBoxOrient2View.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.checkBoxOrient2View.Location = new System.Drawing.Point(17, 104);
|
||||
this.checkBoxOrient2View.Name = "checkBoxOrient2View";
|
||||
this.checkBoxOrient2View.Size = new System.Drawing.Size(92, 17);
|
||||
this.checkBoxOrient2View.TabIndex = 3;
|
||||
this.checkBoxOrient2View.Text = "Orient to View";
|
||||
this.checkBoxOrient2View.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// groupBoxScaling
|
||||
//
|
||||
this.groupBoxScaling.Controls.Add(this.comboBoxUnits);
|
||||
this.groupBoxScaling.Controls.Add(this.textBoxScale);
|
||||
this.groupBoxScaling.Controls.Add(this.labelScaleFactor);
|
||||
this.groupBoxScaling.Controls.Add(this.labelUnits);
|
||||
this.groupBoxScaling.Location = new System.Drawing.Point(10, 202);
|
||||
this.groupBoxScaling.Name = "groupBoxScaling";
|
||||
this.groupBoxScaling.Size = new System.Drawing.Size(456, 50);
|
||||
this.groupBoxScaling.TabIndex = 6;
|
||||
this.groupBoxScaling.TabStop = false;
|
||||
this.groupBoxScaling.Text = "Scaling";
|
||||
//
|
||||
// comboBoxUnits
|
||||
//
|
||||
this.comboBoxUnits.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBoxUnits.FormattingEnabled = true;
|
||||
this.comboBoxUnits.Location = new System.Drawing.Point(79, 18);
|
||||
this.comboBoxUnits.Name = "comboBoxUnits";
|
||||
this.comboBoxUnits.Size = new System.Drawing.Size(121, 21);
|
||||
this.comboBoxUnits.TabIndex = 0;
|
||||
this.comboBoxUnits.SelectedIndexChanged += new System.EventHandler(this.comboBoxUnits_SelectedIndexChanged);
|
||||
//
|
||||
// textBoxScale
|
||||
//
|
||||
this.textBoxScale.Enabled = false;
|
||||
this.textBoxScale.Location = new System.Drawing.Point(310, 19);
|
||||
this.textBoxScale.Name = "textBoxScale";
|
||||
this.textBoxScale.Size = new System.Drawing.Size(122, 20);
|
||||
this.textBoxScale.TabIndex = 1;
|
||||
this.textBoxScale.Text = 1.0.ToString("0.000000");
|
||||
this.textBoxScale.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBoxScale_KeyPress);
|
||||
this.textBoxScale.TextChanged += new System.EventHandler(this.textBoxScale_TextChanged);
|
||||
//
|
||||
// labelScaleFactor
|
||||
//
|
||||
this.labelScaleFactor.AutoSize = true;
|
||||
this.labelScaleFactor.Location = new System.Drawing.Point(234, 22);
|
||||
this.labelScaleFactor.Name = "labelScaleFactor";
|
||||
this.labelScaleFactor.Size = new System.Drawing.Size(67, 13);
|
||||
this.labelScaleFactor.TabIndex = 2;
|
||||
this.labelScaleFactor.Text = "Scale factor:";
|
||||
//
|
||||
// labelUnits
|
||||
//
|
||||
this.labelUnits.AutoSize = true;
|
||||
this.labelUnits.Location = new System.Drawing.Point(7, 22);
|
||||
this.labelUnits.Name = "labelUnits";
|
||||
this.labelUnits.Size = new System.Drawing.Size(64, 13);
|
||||
this.labelUnits.TabIndex = 0;
|
||||
this.labelUnits.Text = "Import units:";
|
||||
//
|
||||
// groupBoxColors
|
||||
//
|
||||
this.groupBoxColors.Controls.Add(this.radioButtonInvertColor);
|
||||
this.groupBoxColors.Controls.Add(this.radioButtonPreserve);
|
||||
this.groupBoxColors.Controls.Add(this.radioButtonBlackWhite);
|
||||
this.groupBoxColors.Location = new System.Drawing.Point(10, 43);
|
||||
this.groupBoxColors.Name = "groupBoxColors";
|
||||
this.groupBoxColors.Size = new System.Drawing.Size(200, 95);
|
||||
this.groupBoxColors.TabIndex = 2;
|
||||
this.groupBoxColors.TabStop = false;
|
||||
this.groupBoxColors.Text = "Layer/Level Colors";
|
||||
//
|
||||
// radioButtonInvertColor
|
||||
//
|
||||
this.radioButtonInvertColor.AutoSize = true;
|
||||
this.radioButtonInvertColor.Checked = true;
|
||||
this.radioButtonInvertColor.Location = new System.Drawing.Point(14, 66);
|
||||
this.radioButtonInvertColor.Name = "radioButtonInvertColor";
|
||||
this.radioButtonInvertColor.Size = new System.Drawing.Size(83, 17);
|
||||
this.radioButtonInvertColor.TabIndex = 2;
|
||||
this.radioButtonInvertColor.TabStop = true;
|
||||
this.radioButtonInvertColor.Text = "Invert colors";
|
||||
this.radioButtonInvertColor.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radioButtonPreserve
|
||||
//
|
||||
this.radioButtonPreserve.AutoSize = true;
|
||||
this.radioButtonPreserve.Location = new System.Drawing.Point(14, 43);
|
||||
this.radioButtonPreserve.Name = "radioButtonPreserve";
|
||||
this.radioButtonPreserve.Size = new System.Drawing.Size(98, 17);
|
||||
this.radioButtonPreserve.TabIndex = 1;
|
||||
this.radioButtonPreserve.Text = "Preserve colors";
|
||||
this.radioButtonPreserve.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radioButtonBlackWhite
|
||||
//
|
||||
this.radioButtonBlackWhite.AutoSize = true;
|
||||
this.radioButtonBlackWhite.Location = new System.Drawing.Point(15, 20);
|
||||
this.radioButtonBlackWhite.Name = "radioButtonBlackWhite";
|
||||
this.radioButtonBlackWhite.Size = new System.Drawing.Size(101, 17);
|
||||
this.radioButtonBlackWhite.TabIndex = 0;
|
||||
this.radioButtonBlackWhite.Text = "Black and white";
|
||||
this.radioButtonBlackWhite.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxCurrentViewOnly
|
||||
//
|
||||
this.checkBoxCurrentViewOnly.AutoSize = true;
|
||||
this.checkBoxCurrentViewOnly.Location = new System.Drawing.Point(17, 147);
|
||||
this.checkBoxCurrentViewOnly.Name = "checkBoxCurrentViewOnly";
|
||||
this.checkBoxCurrentViewOnly.Size = new System.Drawing.Size(107, 17);
|
||||
this.checkBoxCurrentViewOnly.TabIndex = 3;
|
||||
this.checkBoxCurrentViewOnly.Text = "Current view only";
|
||||
this.checkBoxCurrentViewOnly.UseVisualStyleBackColor = true;
|
||||
this.checkBoxCurrentViewOnly.CheckedChanged += new System.EventHandler(this.checkBoxCurrentViewOnly_CheckedChanged);
|
||||
//
|
||||
// comboBoxLayers
|
||||
//
|
||||
this.comboBoxLayers.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBoxLayers.FormattingEnabled = true;
|
||||
this.comboBoxLayers.Location = new System.Drawing.Point(88, 168);
|
||||
this.comboBoxLayers.Name = "comboBoxLayers";
|
||||
this.comboBoxLayers.Size = new System.Drawing.Size(122, 21);
|
||||
this.comboBoxLayers.TabIndex = 4;
|
||||
//
|
||||
// labelLayers
|
||||
//
|
||||
this.labelLayers.AutoSize = true;
|
||||
this.labelLayers.Location = new System.Drawing.Point(14, 172);
|
||||
this.labelLayers.Name = "labelLayers";
|
||||
this.labelLayers.Size = new System.Drawing.Size(41, 13);
|
||||
this.labelLayers.TabIndex = 5;
|
||||
this.labelLayers.Text = "Layers:";
|
||||
//
|
||||
// ImportDWGForm
|
||||
//
|
||||
this.AcceptButton = this.buttonOpen;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.buttonCancel;
|
||||
this.ClientSize = new System.Drawing.Size(480, 316);
|
||||
this.Controls.Add(this.checkBoxCurrentViewOnly);
|
||||
this.Controls.Add(this.groupBoxPositioning);
|
||||
this.Controls.Add(this.labelLayers);
|
||||
this.Controls.Add(this.groupBoxScaling);
|
||||
this.Controls.Add(this.groupBoxColors);
|
||||
this.Controls.Add(this.buttonBrowser);
|
||||
this.Controls.Add(this.comboBoxLayers);
|
||||
this.Controls.Add(this.buttonCancel);
|
||||
this.Controls.Add(this.buttonOpen);
|
||||
this.Controls.Add(this.labelFileName);
|
||||
this.Controls.Add(this.textBoxFileSource);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "ImportDWGForm";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Import";
|
||||
this.groupBoxPositioning.ResumeLayout(false);
|
||||
this.groupBoxPositioning.PerformLayout();
|
||||
this.groupBoxScaling.ResumeLayout(false);
|
||||
this.groupBoxScaling.PerformLayout();
|
||||
this.groupBoxColors.ResumeLayout(false);
|
||||
this.groupBoxColors.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button buttonCancel;
|
||||
private System.Windows.Forms.Button buttonOpen;
|
||||
private System.Windows.Forms.Label labelFileName;
|
||||
private System.Windows.Forms.TextBox textBoxFileSource;
|
||||
private System.Windows.Forms.Button buttonBrowser;
|
||||
private System.Windows.Forms.GroupBox groupBoxPositioning;
|
||||
private System.Windows.Forms.RadioButton radioButtonOrigin2Origin;
|
||||
private System.Windows.Forms.RadioButton radioButtonCenter2Center;
|
||||
private System.Windows.Forms.CheckBox checkBoxCurrentViewOnly;
|
||||
private System.Windows.Forms.ComboBox comboBoxLevel;
|
||||
private System.Windows.Forms.CheckBox checkBoxOrient2View;
|
||||
private System.Windows.Forms.GroupBox groupBoxScaling;
|
||||
private System.Windows.Forms.TextBox textBoxScale;
|
||||
private System.Windows.Forms.Label labelScaleFactor;
|
||||
private System.Windows.Forms.Label labelUnits;
|
||||
private System.Windows.Forms.GroupBox groupBoxColors;
|
||||
private System.Windows.Forms.RadioButton radioButtonInvertColor;
|
||||
private System.Windows.Forms.RadioButton radioButtonPreserve;
|
||||
private System.Windows.Forms.RadioButton radioButtonBlackWhite;
|
||||
private System.Windows.Forms.Label labelAutomaticallyPlace;
|
||||
private System.Windows.Forms.Label labelPlaceLevel;
|
||||
private System.Windows.Forms.ComboBox comboBoxUnits;
|
||||
private System.Windows.Forms.ComboBox comboBoxLayers;
|
||||
private System.Windows.Forms.Label labelLayers;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,362 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Reflection;
|
||||
using System.IO;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// It contains a dialog which provides the options of importing dwg format
|
||||
/// </summary>
|
||||
public partial class ImportDWGForm : System.Windows.Forms.Form
|
||||
{
|
||||
/// <summary>
|
||||
/// Data class
|
||||
/// </summary>
|
||||
ImportDWGData m_importData;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="importData"></param>
|
||||
public ImportDWGForm(ImportDWGData importData)
|
||||
{
|
||||
InitializeComponent();
|
||||
m_importData = importData;
|
||||
InitializeControls();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Change the status of checkBoxOrient2View and comboBoxLevel according to the selection
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void checkBoxCurrentViewOnly_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
bool currentViewOnly = checkBoxCurrentViewOnly.Checked;
|
||||
checkBoxOrient2View.Enabled = !currentViewOnly;
|
||||
comboBoxLevel.Enabled = !currentViewOnly;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialize values and status of controls
|
||||
/// </summary>
|
||||
private void InitializeControls()
|
||||
{
|
||||
//Layers
|
||||
foreach (String layer in m_importData.VisibleLayersOnly)
|
||||
{
|
||||
comboBoxLayers.Items.Add(layer);
|
||||
}
|
||||
comboBoxLayers.SelectedIndex = 0;
|
||||
|
||||
//unit
|
||||
foreach (String unit in m_importData.Unit)
|
||||
{
|
||||
comboBoxUnits.Items.Add(unit);
|
||||
}
|
||||
comboBoxUnits.SelectedIndex = 0;
|
||||
|
||||
//Level
|
||||
foreach (Autodesk.Revit.DB.View view in m_importData.Views)
|
||||
{
|
||||
comboBoxLevel.Items.Add(view.Name);
|
||||
}
|
||||
comboBoxLevel.SelectedIndex = 0;
|
||||
|
||||
//If active view is 3D
|
||||
if (m_importData.Is3DView)
|
||||
{
|
||||
checkBoxCurrentViewOnly.Checked = false;
|
||||
checkBoxCurrentViewOnly.Enabled = false;
|
||||
}
|
||||
|
||||
this.Text = m_importData.Title;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specify a file to export from
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void buttonBrowser_Click(object sender, EventArgs e)
|
||||
{
|
||||
String returnFileFullName = String.Empty;
|
||||
if (MainData.ShowOpenDialog(m_importData, ref returnFileFullName) != DialogResult.Cancel)
|
||||
{
|
||||
textBoxFileSource.Text = returnFileFullName;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Change the status of textBoxScale according to the selection
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void comboBoxUnits_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
bool custom = comboBoxUnits.SelectedIndex == 7;
|
||||
textBoxScale.Enabled = custom;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Transfer information back to ImportData class and execute IMPORT operation
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void buttonOpen_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (ValidateFileName())
|
||||
{
|
||||
//Color Mode
|
||||
SetImportColorMode();
|
||||
//Placement
|
||||
SetImportPlacement();
|
||||
//Current view only, Orient to view, view to import into
|
||||
SetImportViewsRelated();
|
||||
//Visible layers only
|
||||
SetImportLayers();
|
||||
//Unit, scaling
|
||||
SetImportUnitsAndScaling();
|
||||
|
||||
//Import
|
||||
try
|
||||
{
|
||||
if (!m_importData.Import())
|
||||
{
|
||||
TaskDialog.Show("Import", "Cannot import " + Path.GetFileName(m_importData.ImportFileFullName) +
|
||||
" in current settings.", TaskDialogCommonButtons.Ok);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
TaskDialog.Show("Import Failed", ex.ToString(), TaskDialogCommonButtons.Ok);
|
||||
}
|
||||
|
||||
this.DialogResult = DialogResult.OK;
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validate the file to import
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private Boolean ValidateFileName()
|
||||
{
|
||||
String fileNameFull = textBoxFileSource.Text;
|
||||
//If the textBoxFileSource is empty
|
||||
if (String.IsNullOrEmpty(fileNameFull))
|
||||
{
|
||||
TaskDialog.Show("Information", "Please specify the folder and file name!", TaskDialogCommonButtons.Ok);
|
||||
textBoxFileSource.Focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!File.Exists(fileNameFull))
|
||||
{
|
||||
TaskDialog.Show("Information", "Please specify an existing file!", TaskDialogCommonButtons.Ok);
|
||||
textBoxFileSource.Focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
m_importData.ImportFileFullName = fileNameFull;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the value of color mode
|
||||
/// </summary>
|
||||
private void SetImportColorMode()
|
||||
{
|
||||
String colorMode;
|
||||
if (radioButtonBlackWhite.Checked)
|
||||
{
|
||||
colorMode = radioButtonBlackWhite.Text;
|
||||
}
|
||||
else if (radioButtonPreserve.Checked)
|
||||
{
|
||||
colorMode = radioButtonPreserve.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
colorMode = radioButtonInvertColor.Text;
|
||||
}
|
||||
|
||||
int indexColor = 0;
|
||||
for (int i = 0; i < m_importData.ColorMode.Count; ++i)
|
||||
{
|
||||
if (colorMode == m_importData.ColorMode[i])
|
||||
{
|
||||
indexColor = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
m_importData.ImportColorMode = m_importData.EnumColorMode[indexColor];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the value of placement
|
||||
/// </summary>
|
||||
private void SetImportPlacement()
|
||||
{
|
||||
String placement;
|
||||
if (radioButtonCenter2Center.Checked)
|
||||
{
|
||||
placement = radioButtonCenter2Center.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
placement = radioButtonOrigin2Origin.Text;
|
||||
}
|
||||
|
||||
int indexPlacement = 0;
|
||||
for (int i = 0; i < m_importData.Placement.Count; ++i)
|
||||
{
|
||||
if (placement == m_importData.Placement[i])
|
||||
{
|
||||
indexPlacement = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
m_importData.ImportPlacement = m_importData.EnumPlacement[indexPlacement];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the value of ImportThisViewOnly, ImportOrientToView, ImportView
|
||||
/// </summary>
|
||||
private void SetImportViewsRelated()
|
||||
{
|
||||
if (checkBoxCurrentViewOnly.Checked)
|
||||
{
|
||||
m_importData.ImportThisViewOnly = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_importData.ImportThisViewOnly = false;
|
||||
m_importData.ImportOrientToView = checkBoxOrient2View.Checked;
|
||||
String viewName = comboBoxLevel.SelectedItem.ToString();
|
||||
foreach (Autodesk.Revit.DB.View view in m_importData.Views)
|
||||
{
|
||||
if (viewName == view.Name)
|
||||
{
|
||||
m_importData.ImportView = view;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the value of ImportVisibleLayersOnly
|
||||
/// </summary>
|
||||
private void SetImportLayers()
|
||||
{
|
||||
//comboBoxLayers
|
||||
m_importData.ImportVisibleLayersOnly = m_importData.EnumVisibleLayersOnly[comboBoxLayers.SelectedIndex];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the value of unit, scaling
|
||||
/// </summary>
|
||||
private void SetImportUnitsAndScaling()
|
||||
{
|
||||
bool custom = comboBoxUnits.SelectedIndex == 7;
|
||||
|
||||
//Custom is selected
|
||||
if (custom)
|
||||
{
|
||||
//Set the scaling
|
||||
m_importData.ImportCustomScale = Double.Parse(textBoxScale.Text);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Do not change the scaling
|
||||
//Set unit
|
||||
m_importData.ImportUnit = m_importData.EnumUnit[comboBoxUnits.SelectedIndex];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Only numbers and '.' permitted
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void textBoxScale_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if ((e.KeyChar < (char)46 || e.KeyChar > (char)57) && (e.KeyChar != (char)8 || e.KeyChar == (char)47))
|
||||
{
|
||||
e.Handled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Handled = false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Only one '.' permitted
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void textBoxScale_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
bool newPoint = false;
|
||||
char tmp = '0';
|
||||
string text = textBoxScale.Text.Trim();
|
||||
StringBuilder textAfter = new StringBuilder();
|
||||
for (int i = 0; i < text.Length; i++)
|
||||
{
|
||||
tmp = char.Parse(text.Substring(i, 1).ToString());
|
||||
if (!newPoint && (tmp == '.'))
|
||||
{
|
||||
textAfter.Append(tmp);
|
||||
newPoint = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (char.IsDigit(tmp))
|
||||
{
|
||||
textAfter.Append(tmp);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
textBoxScale.Text = textAfter.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,196 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Reflection;
|
||||
using System.IO;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Base data class which stores the basic information for import
|
||||
/// </summary>
|
||||
public class ImportData
|
||||
{
|
||||
#region Class Member Variables
|
||||
/// <summary>
|
||||
/// Revit command data
|
||||
/// </summary>
|
||||
protected ExternalCommandData m_commandData;
|
||||
/// <summary>
|
||||
/// Active document
|
||||
/// </summary>
|
||||
protected Document m_activeDoc;
|
||||
|
||||
/// <summary>
|
||||
/// Directory where to import the file
|
||||
/// </summary>
|
||||
protected String m_importFolder;
|
||||
/// <summary>
|
||||
/// File Name or Prefix to be used
|
||||
/// </summary>
|
||||
protected String m_importFileFullName;
|
||||
|
||||
/// <summary>
|
||||
/// The format to be exported
|
||||
/// </summary>
|
||||
protected ImportFormat m_importFormat;
|
||||
|
||||
/// <summary>
|
||||
/// The filter which will be used in file saving dialog
|
||||
/// </summary>
|
||||
protected String m_filter;
|
||||
|
||||
/// <summary>
|
||||
/// The title of importing dialog
|
||||
/// </summary>
|
||||
protected String m_title;
|
||||
#endregion
|
||||
|
||||
#region Class Properties
|
||||
/// <summary>
|
||||
/// Revit command data
|
||||
/// </summary>
|
||||
public ExternalCommandData CommandData
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_commandData;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// File Name or Prefix to be used
|
||||
/// </summary>
|
||||
public String ImportFileFullName
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_importFileFullName;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_importFileFullName = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The format to be imported
|
||||
/// </summary>
|
||||
public ImportFormat ImportFormat
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_importFormat;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_importFormat = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The filter which will be used in file saving dialog
|
||||
/// </summary>
|
||||
public String Filter
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_filter;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Directory where to import the file
|
||||
/// </summary>
|
||||
public String ImportFolder
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_importFolder;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_importFolder = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The title of importing dialog
|
||||
/// </summary>
|
||||
public String Title
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_title;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Class Member Methods
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="commandData">Revit command data</param>
|
||||
/// <param name="importFormat">Format to import</param>
|
||||
public ImportData(ExternalCommandData commandData, ImportFormat importFormat)
|
||||
{
|
||||
m_commandData = commandData;
|
||||
m_activeDoc = commandData.Application.ActiveUIDocument.Document;
|
||||
m_importFormat = importFormat;
|
||||
m_filter = String.Empty;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the variables
|
||||
/// </summary>
|
||||
private void Initialize()
|
||||
{
|
||||
//The directory into which the file will be imported
|
||||
String dllFilePath = Assembly.GetExecutingAssembly().Location;
|
||||
m_importFolder = Path.GetDirectoryName(dllFilePath);
|
||||
m_importFileFullName = String.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Collect the parameters and import
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public virtual bool Import()
|
||||
{
|
||||
if (m_importFileFullName == null)
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Data class which stores the information for importing GBXML format
|
||||
/// </summary>
|
||||
class ImportGBXMLData : ImportData
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="commandData">Revit command data</param>
|
||||
/// <param name="importFormat">Format to import</param>
|
||||
public ImportGBXMLData(ExternalCommandData commandData, ImportFormat importFormat)
|
||||
: base(commandData, importFormat)
|
||||
{
|
||||
m_filter = "XML Documents (*.xml)|*.xml";
|
||||
m_title = "Import GBXML";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Collect the parameters and export
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override bool Import()
|
||||
{
|
||||
bool imported = false;
|
||||
|
||||
//parameter: GBXMLImportOptions
|
||||
GBXMLImportOptions options = new GBXMLImportOptions();
|
||||
|
||||
//Import
|
||||
Transaction t = new Transaction(m_activeDoc);
|
||||
t.SetName("Import GBXML");
|
||||
t.Start();
|
||||
imported = m_activeDoc.Import(m_importFileFullName, options);
|
||||
t.Commit();
|
||||
|
||||
return imported;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Data class which stores the information for importing image format
|
||||
/// </summary>
|
||||
class ImportImageData : ImportData
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="commandData">Revit command data</param>
|
||||
/// <param name="importFormat">Format to import</param>
|
||||
public ImportImageData(ExternalCommandData commandData, ImportFormat importFormat)
|
||||
: base(commandData, importFormat)
|
||||
{
|
||||
if (OptionalFunctionalityUtils.IsPDFImportAvailable())
|
||||
m_filter = "All Image Files (*.bmp, *.gif, *.jpg, *.jpeg, *.pdf, *.png, *.tif)|*.bmp;*.gif;*.jpg;*.jpeg;*.pdf;*.png;*.tif";
|
||||
else
|
||||
m_filter = "All Image Files (*.bmp, *.gif, *.jpg, *.jpeg, *.png, *.tif)|*.bmp;*.gif;*.jpg;*.jpeg;*.png;*.tif";
|
||||
|
||||
m_title = "Import Image";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Collect the parameters and export
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override bool Import()
|
||||
{
|
||||
using (Transaction t = new Transaction(m_activeDoc))
|
||||
{
|
||||
t.SetName("Import");
|
||||
t.Start();
|
||||
|
||||
// Step 1: Create an ImageType
|
||||
//ImageTypeOptions specifies the source of the image, and how to create the ImageType.
|
||||
// It can be used to specify:
|
||||
// - The image file. Either as a local file path, or as an ExternalResourceRef
|
||||
// - Whether to store the local file path as an absolute path or a relative path.
|
||||
// - Whether to create an Import or a Link image.
|
||||
// In addition, if the source is a PDF file, then ImageTypeOptions can be used to specify:
|
||||
// - which page from the PDF to use
|
||||
// - the resolution (in dots-per-inch) at which to rasterize the PDF
|
||||
// For other image types the page number should be 1 (the default),
|
||||
// and the resolution is only used to determine the size of the image.
|
||||
|
||||
ImageTypeOptions typeOptions = new ImageTypeOptions(m_importFileFullName, true, ImageTypeSource.Import);
|
||||
ImageType imageType = ImageType.Create(m_activeDoc, typeOptions);
|
||||
|
||||
// Step 2: Create an ImageInstance, but only if the active view is able to contain images.
|
||||
View view = CommandData.Application.ActiveUIDocument.Document.ActiveView;
|
||||
if (ImageInstance.IsValidView(view))
|
||||
{
|
||||
|
||||
// ImagePlacementOptions
|
||||
ImagePlacementOptions placementOptions = new ImagePlacementOptions();
|
||||
placementOptions.PlacementPoint = Autodesk.Revit.DB.BoxPlacement.TopLeft;
|
||||
placementOptions.Location = new XYZ(1, 1, 1);
|
||||
|
||||
ImageInstance imageInstance = ImageInstance.Create(m_activeDoc, view, imageType.Id, placementOptions);
|
||||
}
|
||||
|
||||
t.Commit();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Data class which stores the information for importing image format
|
||||
/// </summary>
|
||||
class ImportInventorData : ImportData
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="commandData">Revit command data</param>
|
||||
/// <param name="importFormat">Format to import</param>
|
||||
public ImportInventorData(ExternalCommandData commandData, ImportFormat importFormat)
|
||||
: base(commandData, importFormat)
|
||||
{
|
||||
m_filter = "Autodesk Exchange Files (*.adsk)|*.adsk";
|
||||
m_title = "Import Inventor File";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Collect the parameters and import
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override bool Import()
|
||||
{
|
||||
|
||||
//Import
|
||||
Transaction t = new Transaction(m_activeDoc);
|
||||
t.SetName("Import");
|
||||
t.Start();
|
||||
Document doc =m_commandData.Application.Application.OpenBuildingComponentDocument(m_importFileFullName);
|
||||
t.Commit();
|
||||
|
||||
return doc == null ? false : true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RevitAddIns>
|
||||
<AddIn Type="Command">
|
||||
<Assembly>ImportExport.dll</Assembly>
|
||||
<ClientId>92cc84cd-963f-4d33-8cdc-e01321c0b427</ClientId>
|
||||
<FullClassName>Revit.SDK.Samples.ImportExport.CS.Command</FullClassName>
|
||||
<Text>Import and Export</Text>
|
||||
<Description>Export current project to dwg, dwf(x), gbxml or fbx files and import a dwg or image file into Revit.</Description>
|
||||
<VisibilityMode>AlwaysVisible</VisibilityMode>
|
||||
<VendorId>ADSK</VendorId>
|
||||
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
|
||||
</AddIn>
|
||||
</RevitAddIns>
|
||||
@@ -0,0 +1,211 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{3505D5A1-24CB-46C3-8077-276BC07757D9}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Revit.SDK.Samples.ImportExport.CS</RootNamespace>
|
||||
<AssemblyName>ImportExport</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DocumentationFile>bin\Debug\ImportExport.XML</DocumentationFile>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DocumentationFile>bin\Debug\ImportExport.XML</DocumentationFile>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Command.cs" />
|
||||
<Compile Include="Export\ExportIMGData.cs">
|
||||
</Compile>
|
||||
<Compile Include="Export\ExportIMGOptionsForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Export\ExportIMGOptionsForm.Designer.cs">
|
||||
<DependentUpon>ExportIMGOptionsForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Export\ExportPDFData.cs" />
|
||||
<Compile Include="Export\ExportPDFOptionsForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Export\ExportPDFOptionsForm.Designer.cs">
|
||||
<DependentUpon>ExportPDFOptionsForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Export\ExportSATData.cs" />
|
||||
<Compile Include="Export\ExportDXFData.cs" />
|
||||
<Compile Include="Export\ExportDGNData.cs" />
|
||||
<Compile Include="Export\ExportDGNOptionsForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Export\ExportDGNOptionsForm.Designer.cs">
|
||||
<DependentUpon>ExportDGNOptionsForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Export\ExportFBXData.cs" />
|
||||
<Compile Include="Export\ExportGBXMLData.cs" />
|
||||
<Compile Include="Export\ExportDWFOptionForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Export\ExportDWFOptionForm.Designer.cs">
|
||||
<DependentUpon>ExportDWFOptionForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Export\ExportDWFData.cs" />
|
||||
<Compile Include="Export\ExportData.cs" />
|
||||
<Compile Include="Export\ExportDataWithViews.cs" />
|
||||
<Compile Include="Export\ExportDWGData.cs" />
|
||||
<Compile Include="Export\ExportBaseOptionsData.cs" />
|
||||
<Compile Include="Export\ExportBaseOptionsForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Export\ExportBaseOptionsForm.Designer.cs">
|
||||
<DependentUpon>ExportBaseOptionsForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Import\ImportGBXMLData.cs" />
|
||||
<Compile Include="Import\ImportImageData.cs" />
|
||||
<Compile Include="Import\ImportData.cs" />
|
||||
<Compile Include="Import\ImportDWGData.cs" />
|
||||
<Compile Include="Import\ImportDWGForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Import\ImportDWGForm.Designer.cs">
|
||||
<DependentUpon>ImportDWGForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Export\ExportWithViewsForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Export\ExportWithViewsForm.Designer.cs">
|
||||
<DependentUpon>ExportWithViewsForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Import\ImportInventorData.cs" />
|
||||
<Compile Include="MainData.cs" />
|
||||
<Compile Include="MainForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainForm.Designer.cs">
|
||||
<DependentUpon>MainForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Export\SelectViewsData.cs" />
|
||||
<Compile Include="Export\SelectViewsForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Export\SelectViewsForm.Designer.cs">
|
||||
<DependentUpon>SelectViewsForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Unit.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Export\ExportDWFOptionForm.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>ExportDWFOptionForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Export\ExportDGNOptionsForm.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>ExportDGNOptionsForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Export\ExportIMGOptionsForm.resx">
|
||||
<DependentUpon>ExportIMGOptionsForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Export\ExportPDFOptionsForm.resx">
|
||||
<DependentUpon>ExportPDFOptionsForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Export\ExportWithViewsForm.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>ExportWithViewsForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Export\ExportBaseOptionsForm.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>ExportBaseOptionsForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Import\ImportDWGForm.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>ImportDWGForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="MainForm.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>MainForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Export\SelectViewsForm.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>SelectViewsForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
</ItemGroup>
|
||||
<Import Project="$(SolutionDir)VSProps\SDKSamples.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.pl"
|
||||
if exist %25FILEFORSAMPLEREG%25 perl %25FILEFORSAMPLEREG%25 $(ProjectExt) "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)"</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,466 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Export formats
|
||||
/// </summary>
|
||||
public enum ExportFormat
|
||||
{
|
||||
/// <summary>
|
||||
/// DWG format
|
||||
/// </summary>
|
||||
DWG,
|
||||
/// <summary>
|
||||
/// DXF format
|
||||
/// </summary>
|
||||
DXF,
|
||||
/// <summary>
|
||||
/// SAT format
|
||||
/// </summary>
|
||||
SAT,
|
||||
/// <summary>
|
||||
/// DWF format
|
||||
/// </summary>
|
||||
DWF,
|
||||
/// <summary>
|
||||
/// DWFx format
|
||||
/// </summary>
|
||||
DWFx,
|
||||
/// <summary>
|
||||
/// GBXML format
|
||||
/// </summary>
|
||||
GBXML,
|
||||
/// <summary>
|
||||
/// FBX format
|
||||
/// </summary>
|
||||
FBX,
|
||||
/// <summary>
|
||||
/// DGN format
|
||||
/// </summary>
|
||||
DGN,
|
||||
/// <summary>
|
||||
/// IMG format
|
||||
/// </summary>
|
||||
Image,
|
||||
/// <summary>
|
||||
/// PDF format
|
||||
/// </summary>
|
||||
PDF
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Import formats
|
||||
/// </summary>
|
||||
public enum ImportFormat
|
||||
{
|
||||
/// <summary>
|
||||
/// DWF format
|
||||
/// </summary>
|
||||
DWG,
|
||||
/// <summary>
|
||||
/// IMAGE format
|
||||
/// </summary>
|
||||
IMAGE,
|
||||
/// <summary>
|
||||
/// GBXML format
|
||||
/// </summary>
|
||||
GBXML,
|
||||
/// <summary>
|
||||
/// Inventor format
|
||||
/// </summary>
|
||||
Inventor
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Data class contains the external command data.
|
||||
/// </summary>
|
||||
public class MainData
|
||||
{
|
||||
// Revit command data
|
||||
private ExternalCommandData m_commandData;
|
||||
|
||||
// Whether current view is a 3D view
|
||||
private bool m_is3DView;
|
||||
|
||||
/// <summary>
|
||||
/// Revit command data
|
||||
/// </summary>
|
||||
public ExternalCommandData CommandData
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_commandData;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether current view is a 3D view
|
||||
/// </summary>
|
||||
public bool Is3DView
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_is3DView;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_is3DView = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="commandData">Revit command data</param>
|
||||
public MainData(ExternalCommandData commandData)
|
||||
{
|
||||
m_commandData = commandData;
|
||||
|
||||
//Whether current active view is 3D view
|
||||
if (commandData.Application.ActiveUIDocument.Document.ActiveView.ViewType == Autodesk.Revit.DB.ViewType.ThreeD)
|
||||
{
|
||||
m_is3DView = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_is3DView = false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the format to export
|
||||
/// </summary>
|
||||
/// <param name="selectedFormat">Selected format in format selecting dialog</param>
|
||||
/// <returns>The format to export</returns>
|
||||
private static ExportFormat GetSelectedExportFormat(string selectedFormat)
|
||||
{
|
||||
ExportFormat format = ExportFormat.DWG;
|
||||
switch (selectedFormat)
|
||||
{
|
||||
case "DWG":
|
||||
format = ExportFormat.DWG;
|
||||
break;
|
||||
case "DXF":
|
||||
format = ExportFormat.DXF;
|
||||
break;
|
||||
case "SAT":
|
||||
format = ExportFormat.SAT;
|
||||
break;
|
||||
case "DWF":
|
||||
format = ExportFormat.DWF;
|
||||
break;
|
||||
case "DWFx":
|
||||
format = ExportFormat.DWFx;
|
||||
break;
|
||||
case "GBXML":
|
||||
format = ExportFormat.GBXML;
|
||||
break;
|
||||
case "FBX":
|
||||
format = ExportFormat.FBX;
|
||||
break;
|
||||
case "DGN":
|
||||
format = ExportFormat.DGN;
|
||||
break;
|
||||
case "IMAGE":
|
||||
format = ExportFormat.Image;
|
||||
break;
|
||||
case "PDF":
|
||||
format = ExportFormat.PDF;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return format;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Export according to selected format
|
||||
/// </summary>
|
||||
/// <param name="selectedFormat">Selected format</param>
|
||||
public DialogResult Export(string selectedFormat)
|
||||
{
|
||||
ExportFormat format = GetSelectedExportFormat(selectedFormat);
|
||||
DialogResult dialogResult = DialogResult.OK;
|
||||
|
||||
try
|
||||
{
|
||||
switch (format)
|
||||
{
|
||||
case ExportFormat.DWG:
|
||||
ExportDWGData exportDWGData = new ExportDWGData(m_commandData, format);
|
||||
using (ExportWithViewsForm exportForm = new ExportWithViewsForm(exportDWGData))
|
||||
{
|
||||
dialogResult = exportForm.ShowDialog();
|
||||
}
|
||||
break;
|
||||
case ExportFormat.DXF:
|
||||
ExportDXFData exportDXFData = new ExportDXFData(m_commandData, format);
|
||||
using (ExportWithViewsForm exportForm = new ExportWithViewsForm(exportDXFData))
|
||||
{
|
||||
dialogResult = exportForm.ShowDialog();
|
||||
}
|
||||
break;
|
||||
case ExportFormat.SAT:
|
||||
ExportSATData exportSATData = new ExportSATData(m_commandData, format);
|
||||
using (ExportWithViewsForm exportForm = new ExportWithViewsForm(exportSATData))
|
||||
{
|
||||
dialogResult = exportForm.ShowDialog();
|
||||
}
|
||||
break;
|
||||
case ExportFormat.DWF:
|
||||
case ExportFormat.DWFx:
|
||||
ExportDWFData exportDWFData = new ExportDWFData(m_commandData, format);
|
||||
using (ExportWithViewsForm exportForm = new ExportWithViewsForm(exportDWFData))
|
||||
{
|
||||
dialogResult = exportForm.ShowDialog();
|
||||
}
|
||||
break;
|
||||
case ExportFormat.GBXML:
|
||||
ExportGBXMLData exportGBXMLData = new ExportGBXMLData(m_commandData, format);
|
||||
dialogResult = Export(exportGBXMLData);
|
||||
break;
|
||||
case ExportFormat.FBX:
|
||||
ExportFBXData exportFBXData = new ExportFBXData(m_commandData, format);
|
||||
dialogResult = Export(exportFBXData);
|
||||
break;
|
||||
case ExportFormat.DGN:
|
||||
ExportDGNData exportDGNData = new ExportDGNData(m_commandData, format);
|
||||
using (ExportWithViewsForm exportForm = new ExportWithViewsForm(exportDGNData))
|
||||
{
|
||||
dialogResult = exportForm.ShowDialog();
|
||||
}
|
||||
break;
|
||||
case ExportFormat.Image:
|
||||
ExportIMGData exportIMGdata = new ExportIMGData(m_commandData, format);
|
||||
using (ExportWithViewsForm exportForm = new ExportWithViewsForm(exportIMGdata))
|
||||
{
|
||||
dialogResult = DialogResult.OK;
|
||||
}
|
||||
break;
|
||||
case ExportFormat.PDF:
|
||||
ExportPDFData exportPDFData = new ExportPDFData(m_commandData, format);
|
||||
using (ExportWithViewsForm exportForm = new ExportWithViewsForm(exportPDFData))
|
||||
{
|
||||
dialogResult = exportForm.ShowDialog();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
String errorMessage = "Failed to export " + format + " format" + ex.ToString(); ;
|
||||
TaskDialog.Show("Error", errorMessage, TaskDialogCommonButtons.Ok);
|
||||
}
|
||||
|
||||
return dialogResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Export
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
private static DialogResult Export(ExportData data)
|
||||
{
|
||||
String returnFilename = String.Empty;
|
||||
int filterIndex = -1;
|
||||
|
||||
DialogResult result = ShowSaveDialog(data, ref returnFilename, ref filterIndex);
|
||||
if (result != DialogResult.Cancel)
|
||||
{
|
||||
data.ExportFileName = Path.GetFileName(returnFilename);
|
||||
data.ExportFolder = Path.GetDirectoryName(returnFilename);
|
||||
if (!data.Export())
|
||||
{
|
||||
TaskDialog.Show("Export", "This project cannot be exported to " + data.ExportFileName +
|
||||
" in current settings.", TaskDialogCommonButtons.Ok);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Show Save dialog
|
||||
/// </summary>
|
||||
/// <param name="exportData">Data to export</param>
|
||||
/// <param name="returnFileName">File name will be returned</param>
|
||||
/// <param name="filterIndex">Selected filter index will be returned</param>
|
||||
/// <returns></returns>
|
||||
public static DialogResult ShowSaveDialog(ExportData exportData, ref String returnFileName,
|
||||
ref int filterIndex)
|
||||
{
|
||||
using (SaveFileDialog saveDialog = new SaveFileDialog())
|
||||
{
|
||||
saveDialog.Title = exportData.Title;
|
||||
saveDialog.InitialDirectory = exportData.ExportFolder;
|
||||
saveDialog.FileName = exportData.ExportFileName;
|
||||
saveDialog.Filter = exportData.Filter;
|
||||
saveDialog.FilterIndex = 1;
|
||||
saveDialog.RestoreDirectory = true;
|
||||
|
||||
DialogResult result = saveDialog.ShowDialog();
|
||||
if (result != DialogResult.Cancel)
|
||||
{
|
||||
returnFileName = saveDialog.FileName;
|
||||
filterIndex = saveDialog.FilterIndex;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the format to import
|
||||
/// </summary>
|
||||
/// <param name="selectedFormat">Selected format in format selecting dialog</param>
|
||||
/// <returns>The format to import</returns>
|
||||
private static ImportFormat GetSelectedImportFormat(string selectedFormat)
|
||||
{
|
||||
ImportFormat format = ImportFormat.DWG;
|
||||
switch (selectedFormat)
|
||||
{
|
||||
case "DWG":
|
||||
format = ImportFormat.DWG;
|
||||
break;
|
||||
case "IMAGE":
|
||||
format = ImportFormat.IMAGE;
|
||||
break;
|
||||
case "GBXML":
|
||||
format = ImportFormat.GBXML;
|
||||
break;
|
||||
case "Inventor":
|
||||
format = ImportFormat.Inventor;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return format;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Export according to selected format
|
||||
/// </summary>
|
||||
/// <param name="selectedFormat">Selected format</param>
|
||||
/// <returns></returns>
|
||||
public DialogResult Import(string selectedFormat)
|
||||
{
|
||||
DialogResult dialogResult = DialogResult.OK;
|
||||
ImportFormat format = GetSelectedImportFormat(selectedFormat);
|
||||
|
||||
try
|
||||
{
|
||||
switch (format)
|
||||
{
|
||||
case ImportFormat.DWG:
|
||||
ImportDWGData importDWGData = new ImportDWGData(m_commandData, format);
|
||||
using (ImportDWGForm importForm = new ImportDWGForm(importDWGData))
|
||||
{
|
||||
dialogResult = importForm.ShowDialog();
|
||||
}
|
||||
break;
|
||||
case ImportFormat.IMAGE:
|
||||
ImportImageData importIMAGEData = new ImportImageData(m_commandData, format);
|
||||
dialogResult = Import(importIMAGEData);
|
||||
break;
|
||||
case ImportFormat.GBXML:
|
||||
ImportGBXMLData importGBXMLData = new ImportGBXMLData(m_commandData, format);
|
||||
dialogResult = Import(importGBXMLData);
|
||||
break;
|
||||
case ImportFormat.Inventor:
|
||||
ImportInventorData importInventorData = new ImportInventorData(m_commandData, format);
|
||||
dialogResult = Import(importInventorData);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
String errorMessage = "Failed to import " + format + " format";
|
||||
TaskDialog.Show("Error", errorMessage, TaskDialogCommonButtons.Ok);
|
||||
}
|
||||
|
||||
return dialogResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Import
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
private static DialogResult Import(ImportData data)
|
||||
{
|
||||
String returnFilename = String.Empty;
|
||||
DialogResult result = ShowOpenDialog(data, ref returnFilename);
|
||||
if (result != DialogResult.Cancel)
|
||||
{
|
||||
data.ImportFileFullName = returnFilename;
|
||||
if (!data.Import())
|
||||
{
|
||||
TaskDialog.Show("Import", "Cannot import " + Path.GetFileName(data.ImportFileFullName) +
|
||||
" in current settings.", TaskDialogCommonButtons.Ok);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Show Open File dialog
|
||||
/// </summary>
|
||||
/// <param name="importData">Data to import</param>
|
||||
/// <param name="returnFileName">File name will be returned</param>
|
||||
/// <returns>Dialog result</returns>
|
||||
public static DialogResult ShowOpenDialog(ImportData importData, ref String returnFileName)
|
||||
{
|
||||
using (OpenFileDialog importDialog = new OpenFileDialog())
|
||||
{
|
||||
importDialog.Title = importData.Title;
|
||||
importDialog.InitialDirectory = importData.ImportFolder;
|
||||
importDialog.Filter = importData.Filter;
|
||||
importDialog.RestoreDirectory = true;
|
||||
|
||||
DialogResult result = importDialog.ShowDialog();
|
||||
if (result != DialogResult.Cancel)
|
||||
{
|
||||
returnFileName = importDialog.FileName;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+177
@@ -0,0 +1,177 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Provide a dialog which lets user choose the operation(export or import)
|
||||
/// </summary>
|
||||
partial class MainForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.buttonOK = new System.Windows.Forms.Button();
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.groupBoxOperation = new System.Windows.Forms.GroupBox();
|
||||
this.comboBoxImport = new System.Windows.Forms.ComboBox();
|
||||
this.comboBoxExport = new System.Windows.Forms.ComboBox();
|
||||
this.radioButtonImport = new System.Windows.Forms.RadioButton();
|
||||
this.radioButtonExport = new System.Windows.Forms.RadioButton();
|
||||
this.groupBoxOperation.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// buttonOK
|
||||
//
|
||||
this.buttonOK.Location = new System.Drawing.Point(103, 112);
|
||||
this.buttonOK.Name = "buttonOK";
|
||||
this.buttonOK.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonOK.TabIndex = 0;
|
||||
this.buttonOK.Text = "&OK";
|
||||
this.buttonOK.UseVisualStyleBackColor = true;
|
||||
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.buttonCancel.Location = new System.Drawing.Point(188, 112);
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonCancel.TabIndex = 1;
|
||||
this.buttonCancel.Text = "&Cancel";
|
||||
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
|
||||
//
|
||||
// groupBoxOperation
|
||||
//
|
||||
this.groupBoxOperation.Controls.Add(this.comboBoxImport);
|
||||
this.groupBoxOperation.Controls.Add(this.comboBoxExport);
|
||||
this.groupBoxOperation.Controls.Add(this.radioButtonImport);
|
||||
this.groupBoxOperation.Controls.Add(this.radioButtonExport);
|
||||
this.groupBoxOperation.Location = new System.Drawing.Point(12, 12);
|
||||
this.groupBoxOperation.Name = "groupBoxOperation";
|
||||
this.groupBoxOperation.Size = new System.Drawing.Size(251, 81);
|
||||
this.groupBoxOperation.TabIndex = 2;
|
||||
this.groupBoxOperation.TabStop = false;
|
||||
this.groupBoxOperation.Text = "Operation";
|
||||
//
|
||||
// comboBoxImport
|
||||
//
|
||||
this.comboBoxImport.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBoxImport.FormattingEnabled = true;
|
||||
this.comboBoxImport.Location = new System.Drawing.Point(72, 51);
|
||||
this.comboBoxImport.Name = "comboBoxImport";
|
||||
this.comboBoxImport.Size = new System.Drawing.Size(161, 21);
|
||||
this.comboBoxImport.TabIndex = 2;
|
||||
//
|
||||
// comboBoxExport
|
||||
//
|
||||
this.comboBoxExport.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBoxExport.FormattingEnabled = true;
|
||||
this.comboBoxExport.Location = new System.Drawing.Point(72, 19);
|
||||
this.comboBoxExport.Name = "comboBoxExport";
|
||||
this.comboBoxExport.Size = new System.Drawing.Size(161, 21);
|
||||
this.comboBoxExport.TabIndex = 2;
|
||||
//
|
||||
// radioButtonImport
|
||||
//
|
||||
this.radioButtonImport.AutoSize = true;
|
||||
this.radioButtonImport.Location = new System.Drawing.Point(7, 52);
|
||||
this.radioButtonImport.Name = "radioButtonImport";
|
||||
this.radioButtonImport.Size = new System.Drawing.Size(54, 17);
|
||||
this.radioButtonImport.TabIndex = 1;
|
||||
this.radioButtonImport.TabStop = true;
|
||||
this.radioButtonImport.Text = "Import";
|
||||
this.radioButtonImport.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radioButtonExport
|
||||
//
|
||||
this.radioButtonExport.AutoSize = true;
|
||||
this.radioButtonExport.Checked = true;
|
||||
this.radioButtonExport.Location = new System.Drawing.Point(7, 21);
|
||||
this.radioButtonExport.Name = "radioButtonExport";
|
||||
this.radioButtonExport.Size = new System.Drawing.Size(58, 17);
|
||||
this.radioButtonExport.TabIndex = 0;
|
||||
this.radioButtonExport.TabStop = true;
|
||||
this.radioButtonExport.Text = "Export ";
|
||||
this.radioButtonExport.UseVisualStyleBackColor = true;
|
||||
this.radioButtonExport.CheckedChanged += new System.EventHandler(this.radioButtonExport_CheckedChanged);
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
this.AcceptButton = this.buttonOK;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.buttonCancel;
|
||||
this.ClientSize = new System.Drawing.Size(278, 145);
|
||||
this.Controls.Add(this.groupBoxOperation);
|
||||
this.Controls.Add(this.buttonCancel);
|
||||
this.Controls.Add(this.buttonOK);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "MainForm";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Export/Import";
|
||||
this.groupBoxOperation.ResumeLayout(false);
|
||||
this.groupBoxOperation.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button buttonOK;
|
||||
private System.Windows.Forms.Button buttonCancel;
|
||||
private System.Windows.Forms.GroupBox groupBoxOperation;
|
||||
private System.Windows.Forms.RadioButton radioButtonImport;
|
||||
private System.Windows.Forms.RadioButton radioButtonExport;
|
||||
private System.Windows.Forms.ComboBox comboBoxImport;
|
||||
private System.Windows.Forms.ComboBox comboBoxExport;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Provide a dialog which lets user choose the operation(export or import)
|
||||
/// </summary>
|
||||
public partial class MainForm : System.Windows.Forms.Form
|
||||
{
|
||||
/// <summary>
|
||||
/// Data class
|
||||
/// </summary>
|
||||
MainData m_mainData;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="mainData"></param>
|
||||
public MainForm(MainData mainData)
|
||||
{
|
||||
m_mainData = mainData;
|
||||
InitializeComponent();
|
||||
radioButtonExport.Checked = true;
|
||||
comboBoxExport.Enabled = true;
|
||||
comboBoxImport.Enabled = false;
|
||||
//Append formats to be exported or imported
|
||||
InitializeFormats();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Append formats to be exported or imported
|
||||
/// </summary>
|
||||
private void InitializeFormats()
|
||||
{
|
||||
// Append formats to be exported
|
||||
comboBoxExport.Items.Add("DWG");
|
||||
comboBoxExport.Items.Add("DXF");
|
||||
comboBoxExport.Items.Add("SAT");
|
||||
comboBoxExport.Items.Add("DWF");
|
||||
comboBoxExport.Items.Add("DWFx");
|
||||
comboBoxExport.Items.Add("GBXML");
|
||||
comboBoxExport.Items.Add("DGN");
|
||||
comboBoxExport.Items.Add("PDF");
|
||||
if (m_mainData.Is3DView)
|
||||
{
|
||||
comboBoxExport.Items.Add("FBX");
|
||||
}
|
||||
comboBoxExport.Items.Add("IMAGE");
|
||||
comboBoxExport.SelectedIndex = 0;
|
||||
|
||||
// Append formats to be imported
|
||||
comboBoxImport.Items.Add("DWG");
|
||||
if (!m_mainData.Is3DView)
|
||||
{
|
||||
comboBoxImport.Items.Add("IMAGE");
|
||||
}
|
||||
|
||||
if (m_mainData.CommandData.Application.Application.Product == Autodesk.Revit.ApplicationServices.ProductType.MEP)
|
||||
{
|
||||
comboBoxImport.Items.Add("GBXML");
|
||||
}
|
||||
comboBoxImport.Items.Add("Inventor");
|
||||
|
||||
comboBoxImport.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Show the export/import dialog
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void buttonOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
String selectedFormat = String.Empty;
|
||||
DialogResult result = DialogResult.OK;
|
||||
|
||||
if (radioButtonExport.Checked == true)
|
||||
{
|
||||
selectedFormat = comboBoxExport.SelectedItem.ToString();
|
||||
result = m_mainData.Export(selectedFormat);
|
||||
}
|
||||
else
|
||||
{
|
||||
selectedFormat = comboBoxImport.SelectedItem.ToString();
|
||||
result = m_mainData.Import(selectedFormat);
|
||||
}
|
||||
|
||||
this.DialogResult = (result != DialogResult.Cancel ? DialogResult.OK : DialogResult.None);
|
||||
}
|
||||
|
||||
private void radioButtonExport_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
comboBoxImport.Enabled = !radioButtonExport.Checked;
|
||||
comboBoxExport.Enabled = radioButtonExport.Checked;
|
||||
}
|
||||
|
||||
private void buttonCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,57 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("ImportExport")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("ImportExport")]
|
||||
[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("17637b51-499c-47ad-a41c-afba4811f207")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -0,0 +1,135 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Revit.SDK.Samples.ImportExport.CS.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to cm.
|
||||
/// </summary>
|
||||
internal static string DUT_CENTIMETERS {
|
||||
get {
|
||||
return ResourceManager.GetString("DUT_CENTIMETERS", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to '.
|
||||
/// </summary>
|
||||
internal static string DUT_DECIMAL_FEET {
|
||||
get {
|
||||
return ResourceManager.GetString("DUT_DECIMAL_FEET", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ".
|
||||
/// </summary>
|
||||
internal static string DUT_DECIMAL_INCHES {
|
||||
get {
|
||||
return ResourceManager.GetString("DUT_DECIMAL_INCHES", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to '.
|
||||
/// </summary>
|
||||
internal static string DUT_FEET_FRACTIONAL_INCHES {
|
||||
get {
|
||||
return ResourceManager.GetString("DUT_FEET_FRACTIONAL_INCHES", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ".
|
||||
/// </summary>
|
||||
internal static string DUT_FRACTIONAL_INCHES {
|
||||
get {
|
||||
return ResourceManager.GetString("DUT_FRACTIONAL_INCHES", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to m.
|
||||
/// </summary>
|
||||
internal static string DUT_METERS {
|
||||
get {
|
||||
return ResourceManager.GetString("DUT_METERS", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to m.
|
||||
/// </summary>
|
||||
internal static string DUT_METERS_CENTIMETERS {
|
||||
get {
|
||||
return ResourceManager.GetString("DUT_METERS_CENTIMETERS", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to mm.
|
||||
/// </summary>
|
||||
internal static string DUT_MILLIMETERS {
|
||||
get {
|
||||
return ResourceManager.GetString("DUT_MILLIMETERS", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="DUT_CENTIMETERS" xml:space="preserve">
|
||||
<value>cm</value>
|
||||
</data>
|
||||
<data name="DUT_DECIMAL_FEET" xml:space="preserve">
|
||||
<value>'</value>
|
||||
</data>
|
||||
<data name="DUT_DECIMAL_INCHES" xml:space="preserve">
|
||||
<value>"</value>
|
||||
</data>
|
||||
<data name="DUT_FEET_FRACTIONAL_INCHES" xml:space="preserve">
|
||||
<value>'</value>
|
||||
</data>
|
||||
<data name="DUT_FRACTIONAL_INCHES" xml:space="preserve">
|
||||
<value>"</value>
|
||||
</data>
|
||||
<data name="DUT_METERS" xml:space="preserve">
|
||||
<value>m</value>
|
||||
</data>
|
||||
<data name="DUT_METERS_CENTIMETERS" xml:space="preserve">
|
||||
<value>m</value>
|
||||
</data>
|
||||
<data name="DUT_MILLIMETERS" xml:space="preserve">
|
||||
<value>mm</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,412 @@
|
||||
{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi0\deflang1033\deflangfe2052\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}
|
||||
{\f13\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}SimSun{\*\falt SimSun};}{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;}{\f40\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Verdana;}
|
||||
{\f44\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}@SimSun;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
|
||||
{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;}
|
||||
{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
|
||||
{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}
|
||||
{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f48\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f49\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
|
||||
{\f51\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f52\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f53\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f54\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
|
||||
{\f55\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f56\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f58\fbidi \fswiss\fcharset238\fprq2 Arial CE;}{\f59\fbidi \fswiss\fcharset204\fprq2 Arial Cyr;}
|
||||
{\f61\fbidi \fswiss\fcharset161\fprq2 Arial Greek;}{\f62\fbidi \fswiss\fcharset162\fprq2 Arial Tur;}{\f63\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f64\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);}
|
||||
{\f65\fbidi \fswiss\fcharset186\fprq2 Arial Baltic;}{\f66\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f180\fbidi \fnil\fcharset0\fprq2 SimSun Western{\*\falt SimSun};}{\f388\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}
|
||||
{\f389\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;}{\f391\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f392\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f395\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}
|
||||
{\f396\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);}{\f448\fbidi \fswiss\fcharset238\fprq2 Verdana CE;}{\f449\fbidi \fswiss\fcharset204\fprq2 Verdana Cyr;}{\f451\fbidi \fswiss\fcharset161\fprq2 Verdana Greek;}
|
||||
{\f452\fbidi \fswiss\fcharset162\fprq2 Verdana Tur;}{\f455\fbidi \fswiss\fcharset186\fprq2 Verdana Baltic;}{\f456\fbidi \fswiss\fcharset163\fprq2 Verdana (Vietnamese);}{\f490\fbidi \fnil\fcharset0\fprq2 @SimSun Western;}
|
||||
{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}
|
||||
{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
|
||||
{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
|
||||
{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
|
||||
{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
|
||||
{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhimajor\f31528\fbidi \froman\fcharset238\fprq2 Cambria CE;}{\fhimajor\f31529\fbidi \froman\fcharset204\fprq2 Cambria Cyr;}
|
||||
{\fhimajor\f31531\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\fhimajor\f31532\fbidi \froman\fcharset162\fprq2 Cambria Tur;}{\fhimajor\f31535\fbidi \froman\fcharset186\fprq2 Cambria Baltic;}
|
||||
{\fhimajor\f31536\fbidi \froman\fcharset163\fprq2 Cambria (Vietnamese);}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
|
||||
{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
|
||||
{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
|
||||
{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}
|
||||
{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
|
||||
{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
|
||||
{\fdbminor\f31559\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
|
||||
{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
|
||||
{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}
|
||||
{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\fhiminor\f31573\fbidi \fswiss\fcharset177\fprq2 Calibri (Hebrew);}
|
||||
{\fhiminor\f31574\fbidi \fswiss\fcharset178\fprq2 Calibri (Arabic);}{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}
|
||||
{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}
|
||||
{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
|
||||
{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;
|
||||
\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;
|
||||
\red192\green192\blue192;}{\*\defchp \fs22\loch\af31506\hich\af31506\dbch\af31505 }{\*\defpap \ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{
|
||||
\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe2052\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052
|
||||
\snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\*
|
||||
\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa200\sl276\slmult1
|
||||
\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe2052\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 \snext11 \ssemihidden \sunhideused
|
||||
Normal Table;}}{\*\rsidtbl \rsid402269\rsid464896\rsid604373\rsid2565916\rsid3372176\rsid4525247\rsid4538211\rsid4618596\rsid4663088\rsid5520645\rsid5657062\rsid6581781\rsid7222648\rsid7491589\rsid7941864\rsid8718733\rsid8868754\rsid9060567\rsid9177064
|
||||
\rsid9649500\rsid9848552\rsid10117956\rsid11021988\rsid11037556\rsid11350510\rsid12004094\rsid12416364\rsid12479529\rsid14364853\rsid14632643\rsid15695706\rsid16205040}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0
|
||||
\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\author Boris Shafiro}{\operator Shuang Liang}{\creatim\yr2018\mo1\dy25\hr16\min45}{\revtim\yr2021\mo1\dy19\hr16\min24}{\version5}{\edmins2}{\nofpages3}{\nofwords780}{\nofchars4447}{\nofcharsws5217}
|
||||
{\vern55}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect
|
||||
\widowctrl\ftnbj\aenddoc\trackmoves0\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120\dghorigin1701
|
||||
\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale100\viewnobound1\rsidroot6581781 \fet0{\*\wgrffmtfilter 2450}\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}
|
||||
{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}
|
||||
{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9
|
||||
\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0
|
||||
\fs22\lang1033\langfe2052\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 Application:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 ImportExport\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 Revit Platform:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781
|
||||
\hich\af1\dbch\af31505\loch\f1 All\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 Revit Version:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 2011.0
|
||||
\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 First Released For:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 2008.0\line }{\rtlch\fcs1 \ab\af1\afs20
|
||||
\ltrch\fcs0 \b\f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 Programming Language:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 C#\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0
|
||||
\b\f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 Skill Level:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 High\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6581781
|
||||
\hich\af1\dbch\af31505\loch\f1 Category:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 Data Exchange\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 Type:}
|
||||
{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 ExternalCommand\line \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 Subject:}{\rtlch\fcs1 \af1\afs20
|
||||
\ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 Import and Export data.\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 Summary:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 \line This sample shows how to export current project to dwg, }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af13\insrsid11021988 \hich\af1\dbch\af13\loch\f1 sat,dxf,}{\rtlch\fcs1
|
||||
\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11021988 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 dwf(x), gbxml, fbx, dgn}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid7941864 \hich\af1\dbch\af31505\loch\f1 , pdf}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid7222648 \hich\af1\dbch\af31505\loch\f1 or}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\fs20\loch\af1\hich\af1\dbch\af13\insrsid11021988\charrsid11021988 \hich\af1\dbch\af13\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af13\insrsid11021988 \hich\af1\dbch\af13\loch\f1 image}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 files and how to import a dwg, image, GBXML or }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 Inventor }{\rtlch\fcs1
|
||||
\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 file into Revit.}{\rtlch\fcs1 \ai\af0\afs20 \ltrch\fcs0 \i\f0\fs20\insrsid6581781
|
||||
\par }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 Classes:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1
|
||||
\par }\pard \ltrpar\ql \fi180\li180\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin180\itap0\pararsid6581781 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781\charrsid6581781 \hich\af1\dbch\af31505\loch\f1
|
||||
Autodesk.Revit.UI.IExternalCommand}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \fi180\li180\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin180\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781\charrsid6581781 \hich\af1\dbch\af31505\loch\f1
|
||||
Autodesk.Revit.DB.GBXMLExportOptions }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781
|
||||
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.DWFExportOptions
|
||||
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.DWFXExportOptions
|
||||
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.DWGExportOptions
|
||||
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.FBXExportOptions
|
||||
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.DGNExportOptions
|
||||
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.DWGImportOptions
|
||||
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.ImageImportOptions
|
||||
\par }\pard \ltrpar\ql \fi180\li180\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin180\itap0\pararsid16205040 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid16205040 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.PDFExport}{
|
||||
\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid16205040 \hich\af1\dbch\af31505\loch\f1 Options}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid16205040
|
||||
\par }\pard \ltrpar\ql \fi180\li180\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin180\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.GBXMLImportOptions
|
||||
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.InventorImportOptions}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\lang1036\langfe2052\loch\af1\hich\af1\dbch\af13\langnp1036\insrsid6581781
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\lang1036\langfe2052\loch\af1\hich\af1\dbch\af13\langnp1036\insrsid11350510 \hich\af1\dbch\af13\loch\f1 Autodesk.Revit.DB.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\lang1036\langfe2052\langnp1036\insrsid11350510\charrsid11350510 \hich\af1\dbch\af31505\loch\f1 DXFExportOptions}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\lang1036\langfe2052\loch\af1\hich\af1\dbch\af13\langnp1036\insrsid11350510
|
||||
\par \hich\af1\dbch\af13\loch\f1 Autodesk.Revit.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid11350510\charrsid11350510 \hich\af1\dbch\af31505\loch\f1 DB.SATExportOptions}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\fs20\lang1036\langfe2052\loch\af1\hich\af1\dbch\af13\langnp1036\insrsid11350510
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\lang1036\langfe2052\loch\af1\hich\af1\dbch\af13\langnp1036\insrsid12416364 \hich\af1\dbch\af13\loch\f1 Au\hich\af1\dbch\af13\loch\f1 todesk.Revit.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\fs20\lang1036\langfe2052\loch\af1\hich\af1\dbch\af13\langnp1036\insrsid12416364\charrsid12416364 \hich\af1\dbch\af13\loch\f1 DB.ImageExportOptions}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\fs20\lang1036\langfe2052\loch\af1\hich\af1\dbch\af13\langnp1036\insrsid11350510\charrsid11350510
|
||||
\par }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe2052\langnp1036\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 Project Files:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781
|
||||
\hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \ai\af1\afs20 \ltrch\fcs0 \i\f1\fs20\insrsid6581781
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 Command.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1
|
||||
It contains the class Command which implements interface IExternalCommand}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 .
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 MainData.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 Data}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 class contains the external command data}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781 .
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 MainForm.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1
|
||||
It contains a dialog which lets user choose the operation and the format}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 .}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0
|
||||
\fs20\lang1036\langfe2052\loch\af0\hich\af0\dbch\af13\langnp1036\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid402269 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\loch\af0\hich\af0\dbch\af13\insrsid402269
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid402269\charrsid9060567 \hich\af1\dbch\af31505\loch\f1 ExportBaseOptionsData.cs
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid402269 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid402269 \hich\af1\dbch\af31505\loch\f1 Base data class }{\rtlch\fcs1 \af1\afs20
|
||||
\ltrch\fcs0 \fs20\lang1036\langfe2052\loch\af1\hich\af1\dbch\af13\langnp1036\insrsid402269 \hich\af1\dbch\af13\loch\f1 for }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid402269 \hich\af1\dbch\af31505\loch\f1
|
||||
which stores the basic information for }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\lang1036\langfe2052\loch\af1\hich\af1\dbch\af13\langnp1036\insrsid9177064 \hich\af1\dbch\af13\loch\f1 DWG}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\fs20\lang1036\langfe2052\loch\af1\hich\af1\dbch\af13\langnp1036\insrsid11037556 ,}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\lang1036\langfe2052\loch\af1\hich\af1\dbch\af13\langnp1036\insrsid9177064 \hich\af1\dbch\af13\loch\f1 DXF}{\rtlch\fcs1
|
||||
\af1\afs20 \ltrch\fcs0 \fs20\lang1036\langfe2052\loch\af1\hich\af1\dbch\af13\langnp1036\insrsid402269 \hich\af1\dbch\af13\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid402269 \hich\af1\dbch\af31505\loch\f1
|
||||
export}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe2052\langnp1036\insrsid402269 .
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid402269 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\loch\af0\hich\af0\dbch\af13\insrsid402269\charrsid402269
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9060567\charrsid464896 \hich\af1\dbch\af31505\loch\f1 ExportBaseOptionsForm.cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid6581781\charrsid464896
|
||||
\par }\pard \ltrpar\ql \fi390\li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid8718733 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9060567\charrsid464896 \hich\af1\dbch\af31505\loch\f1
|
||||
It contains a dialog which provides the options of common information for }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9649500 \hich\af1\dbch\af31505\loch\f1 D}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af13\insrsid9649500
|
||||
\hich\af1\dbch\af13\loch\f1 WG}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid5520645\charrsid464896 \hich\af1\dbch\af31505\loch\f1 , }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af13\insrsid9649500 \hich\af1\dbch\af13\loch\f1
|
||||
DXF}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid5520645\charrsid464896 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9060567\charrsid464896 \hich\af1\dbch\af31505\loch\f1 exporting view related}{\rtlch\fcs1
|
||||
\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8718733\charrsid464896 .}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9060567\charrsid464896 \hich\af1\dbch\af31505\loch\f1 \tab
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid464896 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\loch\af0\hich\af0\dbch\af13\insrsid464896
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid464896\charrsid9177064 \hich\af1\dbch\af31505\loch\f1 ExportDXFData.cs
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid464896 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid464896\charrsid9177064 \hich\af1\dbch\af31505\loch\f1 Data}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid464896 \hich\af1\dbch\af31505\loch\f1 class }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid464896\charrsid9177064 \hich\af1\dbch\af31505\loch\f1 which stores the main information for exporting dxf format.
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid464896 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid464896\charrsid9177064
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9177064\charrsid9177064 \hich\af1\dbch\af31505\loch\f1 ExportDXFOptionsForm.cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af13\insrsid464896
|
||||
\par }\pard \ltrpar\ql \fi390\li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid9177064 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af13\insrsid9177064\charrsid9177064 \hich\af1\dbch\af13\loch\f1 Derive}{\rtlch\fcs1
|
||||
\af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af13\insrsid9177064 \hich\af1\dbch\af13\loch\f1 from the class }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9177064\charrsid464896 \hich\af1\dbch\af31505\loch\f1 ExportBaseOptionsForm}{
|
||||
\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af13\insrsid9177064 .
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af13\insrsid9177064\charrsid9177064
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid464896 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid464896\charrsid9177064 \hich\af1\dbch\af31505\loch\f1 ExportSATData.cs
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid464896 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid464896\charrsid9177064 \hich\af1\dbch\af31505\loch\f1 Data}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid464896 \hich\af1\dbch\af31505\loch\f1 class }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid464896\charrsid9177064 \hich\af1\dbch\af31505\loch\f1 which stores the main information for exporting sat format.}{\rtlch\fcs1 \af1\afs20
|
||||
\ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af13\insrsid464896
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af13\insrsid4618596\charrsid4618596
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid464896 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid4618596\charrsid4618596 \hich\af1\dbch\af31505\loch\f1 ExportIMGData.cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid464896\charrsid4618596
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid4618596 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid4618596\charrsid9177064 \hich\af1\dbch\af31505\loch\f1 Data}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid4618596 \hich\af1\dbch\af31505\loch\f1 class }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid4618596\charrsid9177064 \hich\af1\dbch\af31505\loch\f1 which stores the main information for exporting }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\fs20\loch\af1\hich\af1\dbch\af13\insrsid4618596 \hich\af1\dbch\af13\loch\f1 image}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid4618596\charrsid9177064 \hich\af1\dbch\af31505\loch\f1 format.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid4618596
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid12479529 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12479529
|
||||
\par \hich\af1\dbch\af31505\loch\f1 ExportPDFData.cs
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid12479529 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12479529 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid12479529\charrsid9177064 \hich\af1\dbch\af31505\loch\f1 Data}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12479529 \hich\af1\dbch\af31505\loch\f1 class }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12479529\charrsid9177064
|
||||
\hich\af1\dbch\af31505\loch\f1 which stores the main information for exporting }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af13\insrsid12479529 \hich\af1\dbch\af13\loch\f1 pdf}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid12479529\charrsid9177064 \hich\af1\dbch\af31505\loch\f1 format.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12479529\charrsid12479529
|
||||
\par }\pard \ltrpar\ql \fi390\li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid8718733 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\loch\af0\hich\af0\dbch\af13\insrsid464896
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid10117956 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10117956\charrsid10117956 \hich\af1\dbch\af31505\loch\f1 ExportIMGOptionsForm.cs}{\rtlch\fcs1 \af1\afs20
|
||||
\ltrch\fcs0 \f1\fs20\insrsid4618596\charrsid10117956
|
||||
\par }\pard \ltrpar\ql \fi390\li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid14632643 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid604373\charrsid464896 \hich\af1\dbch\af31505\loch\f1 It \hich\af1\dbch\af31505\loch\f1
|
||||
contains a dialog which provides the options of common information for}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af13\insrsid4538211 \hich\af1\dbch\af13\loch\f1 image}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid604373\charrsid464896 \hich\af1\dbch\af31505\loch\f1 exporting view related.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af13\insrsid4663088
|
||||
\par }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\loch\af0\hich\af0\dbch\af13\insrsid14632643\charrsid14632643
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 ExportData.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1
|
||||
Base data class which stores the basic information for export}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 .
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 ExportDataWithViews.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1
|
||||
Base data class which stores the basic information for exporting view related formats}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 .
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 ExportWithViewsForm.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1
|
||||
It contains a dialog which provides the options of common information for exporting view related formats}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 .
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 ExportDWGData.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 Data}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 class }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 which stor\hich\af1\dbch\af31505\loch\f1
|
||||
es the main information for exporting dwg format}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 .
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 ExportDWGOptionsData.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 Data}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 class }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 which stores information of lower priority for exporting dwg format}{
|
||||
\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 .}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 ExportDWGOptionsForm.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \fi390\li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid2565916 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af13\insrsid2565916\charrsid9177064 \hich\af1\dbch\af13\loch\f1 Derive}{\rtlch\fcs1
|
||||
\af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af13\insrsid2565916 \hich\af1\dbch\af13\loch\f1 from the class }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid2565916\charrsid464896 \hich\af1\dbch\af31505\loch\f1 ExportBaseOptionsForm}{
|
||||
\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af13\insrsid2565916 .
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9848552 \hich\af1\dbch\af31505\loch\f1 Export}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 DWFData.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0
|
||||
\f0\fs20\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 Data class wh\hich\af1\dbch\af31505\loch\f1
|
||||
ich stores the information for exporting DWF(x) format}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 .
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9848552 \hich\af1\dbch\af31505\loch\f1 Export}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 DWFOptionForm.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0
|
||||
\f0\fs20\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid9848552 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1
|
||||
It contains a dialog which provides the options of lower priority information for exporting 2D DWF(x) format}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid9848552\charrsid9848552
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 ExportFBXData.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1
|
||||
Data class which stores the information for exporting fbx format}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 .
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe2052\langnp1036\insrsid6581781
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 ExportGBXMLData.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1
|
||||
Data class which stores the information for exporting gbxml format}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 .
|
||||
\par
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 ExportDGNData.cs
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1
|
||||
Data class which stores the information for exporting dgn format}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 .
|
||||
\par
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 ExportDGNOptionsF\hich\af1\dbch\af31505\loch\f1 orm.cs
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1
|
||||
It contains a dialog which provides the options for exporting dgn format}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 .}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 SelectViewsData.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 Data}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 class}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 which stores information of views for export}{\rtlch\fcs1 \af0\afs20
|
||||
\ltrch\fcs0 \f0\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 .
|
||||
\par }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 SelectViewsForm.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1
|
||||
It contains a dialog which lets users choose views to export.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 ImportData.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 B\hich\af1\dbch\af31505\loch\f1
|
||||
ase data class which stores the basic information for import}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 .
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe2052\langnp1036\insrsid6581781
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 ImportDWGData.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 Data}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 class}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 which stores the information for importing dwg format}{\rtlch\fcs1
|
||||
\af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 .}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 ImportDWGForm.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 It }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 contains a dialog which provides the options of importing dwg format}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 .}{
|
||||
\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 ImportImageData.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 Data}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 class}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 which stores the information for importing image format}{\rtlch\fcs1
|
||||
\af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 .
|
||||
\par
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 ImportGBXMLData.cs
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 Data}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 class}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 which stores the information for importing GBXML format}{\rtlch\fcs1
|
||||
\af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 .}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 ImportInventorData.cs
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 Data}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 class}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 which stores the information for importing Inventor format}{
|
||||
\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 .}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af0\afs20 \ltrch\fcs0 \b\f0\fs20\insrsid6581781
|
||||
\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 Des\hich\af1\dbch\af31505\loch\f1 cription:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1
|
||||
\af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 This sample provides following functionalities.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 -\tab \hich\af1\dbch\af31505\loch\f1
|
||||
Let users specify the export options and export the current project to dwg, dwf(x), gbxml, fbx}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid7222648 \hich\af1\dbch\af31505\loch\f1 or}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781
|
||||
\hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 dgn }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1
|
||||
files}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781 .
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 -\tab \hich\af1\dbch\af31505\loch\f1 Let users specify the import options and import a dwg, image, }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781
|
||||
\hich\af1\dbch\af31505\loch\f1 GBXML or Inventor}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 file into Revit. }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781
|
||||
\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 Instructions:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf2\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0
|
||||
\f0\fs20\cf2\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 1.\tab Open Revit application and execute the command}{\rtlch\fcs1
|
||||
\af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781 .}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 2.\tab \hich\f1 To export, check the radio button \'93\loch\f1 \hich\f1 export
|
||||
\'94\loch\f1 \hich\f1 , select the format to export and click \'93\loch\f1 \hich\f1 OK\'94\loch\f1 button}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781 .}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781
|
||||
\hich\af1\dbch\af31505\loch\f1 The 3D DWF(x) and fbx formats will be available only when current view i\hich\af1\dbch\af31505\loch\f1 s a 3D view.
|
||||
\par }\pard \ltrpar\ql \fi-420\li780\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin780\itap0 {\rtlch\fcs1 \af40\afs20 \ltrch\fcs0 \f40\fs20\insrsid6581781 -\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1
|
||||
To export dwg, DWF(x) or dgn formats
|
||||
\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 \hich\f1 Specify the file name to export to, set the common options and click \'93
|
||||
\loch\f1 \hich\f1 Option\'85\'94\loch\f1 button to set the }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 lower priority}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 \hich\f1 options, click \'93\loch\f1 \hich\f1 Select\'85\'94\loch\f1 \hich\f1 button to select multi-views to export. Then click \'93\loch\f1 \hich\f1 Save\'94\hich\af1\dbch\af31505\loch\f1
|
||||
button to perform export.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \fi-420\li780\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin780\itap0 {\rtlch\fcs1 \af40\afs20 \ltrch\fcs0 \f40\fs20\insrsid6581781 -\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1
|
||||
To export gbxml or fbx formats
|
||||
\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 \hich\f1 Specify the file name to export to and click \'93\loch\f1 \hich\f1 Save\'94
|
||||
\loch\f1 button to perform export.
|
||||
\par \hich\af1\dbch\af31505\loch\f1 [}{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 NOTE}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1
|
||||
]To export fbx format successfully, the Revit render appearance library must have been installed}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781 .
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781 \hich\af0\dbch\af31505\loch\f0 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781
|
||||
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 3.\tab To import\hich\af1\dbch\af31505\loch\f1 \hich\f1
|
||||
, check the radio button \'93\loch\f1 \hich\f1 import\'94\loch\f1 \hich\f1 and click \'93\loch\f1 \hich\f1 OK\'94\loch\f1 button. The image format will be available only when current view is not 3D view.
|
||||
\par }\pard \ltrpar\ql \fi-420\li780\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin780\itap0 {\rtlch\fcs1 \af40\afs20 \ltrch\fcs0 \f40\fs20\insrsid6581781 -\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1
|
||||
To import dwg format
|
||||
\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 \hich\f1 Specify the dwg file to import and set the other options. Then click \'93
|
||||
\loch\f1 \hich\f1 Open\'94\loch\f1 button to perform import}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6581781 .
|
||||
\par }\pard \ltrpar\ql \fi-420\li780\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin780\itap0 {\rtlch\fcs1 \af40\afs20 \ltrch\fcs0 \f40\fs20\insrsid6581781 -\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1
|
||||
To Import image,}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 GBXML or Inventor}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1
|
||||
format
|
||||
\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6581781 \hich\af1\dbch\af31505\loch\f1 \hich\f1 Specify the file to import and click \'93\loch\f1 \hich\f1 Open\'94\loch\f1
|
||||
button to perform import.
|
||||
\par }{\*\themedata 504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a
|
||||
9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad
|
||||
5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6
|
||||
b01d583deee5f99824e290b4ba3f364eac4a430883b3c092d4eca8f946c916422ecab927f52ea42b89a1cd59c254f919b0e85e6535d135a8de20f20b8c12c3b0
|
||||
0c895fcf6720192de6bf3b9e89ecdbd6596cbcdd8eb28e7c365ecc4ec1ff1460f53fe813d3cc7f5b7f020000ffff0300504b030414000600080000002100a5d6
|
||||
a7e7c0000000360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4f
|
||||
c7060abb0884a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b6309512
|
||||
0f88d94fbc52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462
|
||||
a1a82fe353bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f746865
|
||||
6d652f7468656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b
|
||||
4b0d592c9c070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b
|
||||
4757e8d3f729e245eb2b260a0238fd010000ffff0300504b03041400060008000000210096b5ade296060000501b0000160000007468656d652f7468656d652f
|
||||
7468656d65312e786d6cec594f6fdb3614bf0fd87720746f6327761a07758ad8b19b2d4d1bc46e871e698996d850a240d2497d1bdae38001c3ba618715d86d87
|
||||
615b8116d8a5fb34d93a6c1dd0afb0475292c5585e9236d88aad3e2412f9e3fbff1e1fa9abd7eec70c1d1221294fda5efd72cd4324f1794093b0eddd1ef62fad
|
||||
79482a9c0498f184b4bd2991deb58df7dfbb8ad755446282607d22d771db8b944ad79796a40fc3585ee62949606ecc458c15bc8a702910f808e8c66c69b9565b
|
||||
5d8a314d3c94e018c8de1a8fa94fd05093f43672e23d06af89927ac06762a049136785c10607758d9053d965021d62d6f6804fc08f86e4bef210c352c144dbab
|
||||
999fb7b4717509af678b985ab0b6b4ae6f7ed9ba6c4170b06c788a705430adf71bad2b5b057d03606a1ed7ebf5babd7a41cf00b0ef83a6569632cd467faddec9
|
||||
699640f6719e76b7d6ac355c7c89feca9cccad4ea7d36c65b258a206641f1b73f8b5da6a6373d9c11b90c537e7f08dce66b7bbeae00dc8e257e7f0fd2badd586
|
||||
8b37a088d1e4600ead1ddaef67d40bc898b3ed4af81ac0d76a197c86826828a24bb318f3442d8ab518dfe3a20f000d6458d104a9694ac6d88728eee2782428d6
|
||||
0cf03ac1a5193be4cbb921cd0b495fd054b5bd0f530c1931a3f7eaf9f7af9e3f45c70f9e1d3ff8e9f8e1c3e3073f5a42ceaa6d9c84e5552fbffdeccfc71fa33f
|
||||
9e7ef3f2d117d57859c6fffac327bffcfc793510d26726ce8b2f9ffcf6ecc98baf3efdfdbb4715f04d814765f890c644a29be408edf3181433567125272371be
|
||||
15c308d3f28acd249438c19a4b05fd9e8a1cf4cd296699771c393ac4b5e01d01e5a30a787d72cf1178108989a2159c77a2d801ee72ce3a5c545a6147f32a9979
|
||||
3849c26ae66252c6ed637c58c5bb8b13c7bfbd490a75330f4b47f16e441c31f7184e140e494214d273fc80900aedee52ead87597fa824b3e56e82e451d4c2b4d
|
||||
32a423279a668bb6690c7e9956e90cfe766cb37b077538abd27a8b1cba48c80acc2a841f12e698f13a9e281c57911ce298950d7e03aba84ac8c154f8655c4f2a
|
||||
f074481847bd804859b5e696007d4b4edfc150b12addbecba6b18b148a1e54d1bc81392f23b7f84137c2715a851dd0242a633f900710a218ed715505dfe56e86
|
||||
e877f0034e16bafb0e258ebb4faf06b769e888340b103d3311da9750aa9d0a1cd3e4efca31a3508f6d0c5c5c398602f8e2ebc71591f5b616e24dd893aa3261fb
|
||||
44f95d843b5974bb5c04f4edafb95b7892ec1108f3f98de75dc97d5772bdff7cc95d94cf672db4b3da0a6557f70db629362d72bcb0431e53c6066acac80d699a
|
||||
6409fb44d08741bdce9c0e4971624a2378cceaba830b05366b90e0ea23aaa241845368b0eb9e2612ca8c742851ca251ceccc70256d8d87265dd96361531f186c
|
||||
3d9058edf2c00eafe8e1fc5c509031bb4d680e9f39a3154de0accc56ae644441edd76156d7429d995bdd88664a9dc3ad50197c38af1a0c16d684060441db0256
|
||||
5e85f3b9660d0713cc48a0ed6ef7dedc2dc60b17e92219e180643ed27acffba86e9c94c78ab90980d8a9f0913ee49d62b512b79626fb06dccee2a432bbc60276
|
||||
b9f7dec44b7904cfbca4f3f6443ab2a49c9c2c41476dafd55c6e7ac8c769db1bc399161ee314bc2e75cf8759081743be1236ec4f4d6693e5336fb672c5dc24a8
|
||||
c33585b5fb9cc24e1d4885545b58463634cc5416022cd19cacfccb4d30eb45296023fd35a458598360f8d7a4003bbaae25e331f155d9d9a5116d3bfb9a95523e
|
||||
51440ca2e0088dd844ec6370bf0e55d027a012ae264c45d02f708fa6ad6da6dce29c255df9f6cae0ec38666984b372ab5334cf640b37795cc860de4ae2816e95
|
||||
b21be5ceaf8a49f90b52a51cc6ff3355f47e0237052b81f6800fd7b802239daf6d8f0b1571a8426944fdbe80c6c1d40e8816b88b8569082ab84c36ff0539d4ff
|
||||
6dce591a26ade1c0a7f669880485fd484582903d284b26fa4e2156cff62e4b9265844c4495c495a9157b440e091bea1ab8aaf7760f4510eaa69a6465c0e04ec6
|
||||
9ffb9e65d028d44d4e39df9c1a52ecbd3607fee9cec7263328e5d661d3d0e4f62f44acd855ed7ab33cdf7bcb8ae889599bd5c8b3029895b6825696f6af29c239
|
||||
b75a5bb1e6345e6ee6c28117e73586c1a2214ae1be07e93fb0ff51e133fb65426fa843be0fb515c187064d0cc206a2fa926d3c902e907670048d931db4c1a449
|
||||
59d366ad93b65abe595f70a75bf03d616c2dd959fc7d4e6317cd99cbcec9c58b34766661c7d6766ca1a9c1b327531486c6f941c638c67cd22a7f75e2a37be0e8
|
||||
2db8df9f30254d30c1372581a1f51c983c80e4b71ccdd28dbf000000ffff0300504b0304140006000800000021000dd1909fb60000001b010000270000007468
|
||||
656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f78277086f6fd3ba109126dd88d0add40384e4
|
||||
350d363f2451eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b060828e6f37ed1567914b284d2624
|
||||
52282e3198720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509affb3fd381a89672f1f165dfe5141
|
||||
73d9850528a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100e9de0fbfff0000001c020000130000000000000000
|
||||
0000000000000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6a7e7c0000000360100000b00000000000000
|
||||
000000000000300100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a0000001c0000000000000000000000000019
|
||||
0200007468656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d001400060008000000210096b5ade296060000501b00001600000000
|
||||
000000000000000000d60200007468656d652f7468656d652f7468656d65312e786d6c504b01022d00140006000800000021000dd1909fb60000001b01000027
|
||||
00000000000000000000000000a00900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d0100009b0a00000000}
|
||||
{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d
|
||||
617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169
|
||||
6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363
|
||||
656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e}
|
||||
{\*\latentstyles\lsdstimax375\lsdlockeddef0\lsdsemihiddendef0\lsdunhideuseddef0\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 1;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 2;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 3;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 4;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 5;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 6;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 7;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 8;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 9;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority35 \lsdlocked0 caption;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 macro;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number;\lsdqformat1 \lsdpriority10 \lsdlocked0 Title;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdpriority1 \lsdlocked0 Default Paragraph Font;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 4;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Message Header;\lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdqformat1 \lsdpriority22 \lsdlocked0 Strong;
|
||||
\lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Balloon Text;\lsdpriority59 \lsdlocked0 Table Grid;\lsdsemihidden1 \lsdlocked0 Placeholder Text;\lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing;
|
||||
\lsdpriority60 \lsdlocked0 Light Shading;\lsdpriority61 \lsdlocked0 Light List;\lsdpriority62 \lsdlocked0 Light Grid;\lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdpriority64 \lsdlocked0 Medium Shading 2;\lsdpriority65 \lsdlocked0 Medium List 1;
|
||||
\lsdpriority66 \lsdlocked0 Medium List 2;\lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdpriority68 \lsdlocked0 Medium Grid 2;\lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdpriority70 \lsdlocked0 Dark List;\lsdpriority71 \lsdlocked0 Colorful Shading;
|
||||
\lsdpriority72 \lsdlocked0 Colorful List;\lsdpriority73 \lsdlocked0 Colorful Grid;\lsdpriority60 \lsdlocked0 Light Shading Accent 1;\lsdpriority61 \lsdlocked0 Light List Accent 1;\lsdpriority62 \lsdlocked0 Light Grid Accent 1;
|
||||
\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;\lsdsemihidden1 \lsdlocked0 Revision;\lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;
|
||||
\lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1;
|
||||
\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 1;\lsdpriority72 \lsdlocked0 Colorful List Accent 1;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;
|
||||
\lsdpriority60 \lsdlocked0 Light Shading Accent 2;\lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdpriority62 \lsdlocked0 Light Grid Accent 2;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;
|
||||
\lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 2;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2;
|
||||
\lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 2;\lsdpriority72 \lsdlocked0 Colorful List Accent 2;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;\lsdpriority60 \lsdlocked0 Light Shading Accent 3;
|
||||
\lsdpriority61 \lsdlocked0 Light List Accent 3;\lsdpriority62 \lsdlocked0 Light Grid Accent 3;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;
|
||||
\lsdpriority66 \lsdlocked0 Medium List 2 Accent 3;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;\lsdpriority70 \lsdlocked0 Dark List Accent 3;
|
||||
\lsdpriority71 \lsdlocked0 Colorful Shading Accent 3;\lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 3;\lsdpriority60 \lsdlocked0 Light Shading Accent 4;\lsdpriority61 \lsdlocked0 Light List Accent 4;
|
||||
\lsdpriority62 \lsdlocked0 Light Grid Accent 4;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 4;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 4;
|
||||
\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdpriority70 \lsdlocked0 Dark List Accent 4;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 4;
|
||||
\lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdpriority60 \lsdlocked0 Light Shading Accent 5;\lsdpriority61 \lsdlocked0 Light List Accent 5;\lsdpriority62 \lsdlocked0 Light Grid Accent 5;
|
||||
\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 5;
|
||||
\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5;\lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 5;
|
||||
\lsdpriority72 \lsdlocked0 Colorful List Accent 5;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdpriority61 \lsdlocked0 Light List Accent 6;\lsdpriority62 \lsdlocked0 Light Grid Accent 6;
|
||||
\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 6;
|
||||
\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdpriority70 \lsdlocked0 Dark List Accent 6;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 6;
|
||||
\lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 6;\lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis;
|
||||
\lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference;\lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdsemihidden1 \lsdunhideused1 \lsdpriority37 \lsdlocked0 Bibliography;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;\lsdpriority41 \lsdlocked0 Plain Table 1;\lsdpriority42 \lsdlocked0 Plain Table 2;\lsdpriority43 \lsdlocked0 Plain Table 3;\lsdpriority44 \lsdlocked0 Plain Table 4;
|
||||
\lsdpriority45 \lsdlocked0 Plain Table 5;\lsdpriority40 \lsdlocked0 Grid Table Light;\lsdpriority46 \lsdlocked0 Grid Table 1 Light;\lsdpriority47 \lsdlocked0 Grid Table 2;\lsdpriority48 \lsdlocked0 Grid Table 3;\lsdpriority49 \lsdlocked0 Grid Table 4;
|
||||
\lsdpriority50 \lsdlocked0 Grid Table 5 Dark;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 1;
|
||||
\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 1;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 1;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 1;
|
||||
\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 1;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 2;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 2;
|
||||
\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 2;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 2;
|
||||
\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 3;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 3;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 3;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 3;
|
||||
\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 3;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 4;
|
||||
\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 4;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 4;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 4;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 4;
|
||||
\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 4;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 5;
|
||||
\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 5;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 5;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 5;
|
||||
\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 5;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 6;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 6;
|
||||
\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 6;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 6;
|
||||
\lsdpriority46 \lsdlocked0 List Table 1 Light;\lsdpriority47 \lsdlocked0 List Table 2;\lsdpriority48 \lsdlocked0 List Table 3;\lsdpriority49 \lsdlocked0 List Table 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark;
|
||||
\lsdpriority51 \lsdlocked0 List Table 6 Colorful;\lsdpriority52 \lsdlocked0 List Table 7 Colorful;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 List Table 2 Accent 1;\lsdpriority48 \lsdlocked0 List Table 3 Accent 1;
|
||||
\lsdpriority49 \lsdlocked0 List Table 4 Accent 1;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 1;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 1;
|
||||
\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 List Table 2 Accent 2;\lsdpriority48 \lsdlocked0 List Table 3 Accent 2;\lsdpriority49 \lsdlocked0 List Table 4 Accent 2;
|
||||
\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 2;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 3;
|
||||
\lsdpriority47 \lsdlocked0 List Table 2 Accent 3;\lsdpriority48 \lsdlocked0 List Table 3 Accent 3;\lsdpriority49 \lsdlocked0 List Table 4 Accent 3;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 3;
|
||||
\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 4;\lsdpriority47 \lsdlocked0 List Table 2 Accent 4;
|
||||
\lsdpriority48 \lsdlocked0 List Table 3 Accent 4;\lsdpriority49 \lsdlocked0 List Table 4 Accent 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 4;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 4;
|
||||
\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 List Table 2 Accent 5;\lsdpriority48 \lsdlocked0 List Table 3 Accent 5;
|
||||
\lsdpriority49 \lsdlocked0 List Table 4 Accent 5;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 5;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 5;
|
||||
\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 List Table 2 Accent 6;\lsdpriority48 \lsdlocked0 List Table 3 Accent 6;\lsdpriority49 \lsdlocked0 List Table 4 Accent 6;
|
||||
\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 6;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Mention;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Smart Hyperlink;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Hashtag;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Unresolved Mention;}}{\*\datastore 010500000200000018000000
|
||||
4d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000
|
||||
d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e5000000000000000000000000d0f5
|
||||
518f3ceed601feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000105000000000000}}
|
||||
@@ -0,0 +1,80 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Autodesk.Revit.DB;
|
||||
using System.Configuration;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Revit.SDK.Samples.ImportExport.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides static functions to convert unit
|
||||
/// </summary>
|
||||
static class Unit
|
||||
{
|
||||
#region Methods
|
||||
/// <summary>
|
||||
/// Convert the value get from RevitAPI to the value indicated by ForgeTypeId
|
||||
/// </summary>
|
||||
/// <param name="to">ForgeTypeId indicates unit of target value</param>
|
||||
/// <param name="value">value get from RevitAPI</param>
|
||||
/// <returns>Target value</returns>
|
||||
public static double CovertFromAPI(ForgeTypeId to, double value)
|
||||
{
|
||||
return value *= ImperialDutRatio(to);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert a value indicated by ForgeTypeId to the value used by RevitAPI
|
||||
/// </summary>
|
||||
/// <param name="value">Value to be converted</param>
|
||||
/// <param name="from">ForgeTypeId indicates the unit of the value to be converted</param>
|
||||
/// <returns>Target value</returns>
|
||||
public static double CovertToAPI(double value, ForgeTypeId from )
|
||||
{
|
||||
return value /= ImperialDutRatio(from);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get ratio between value in RevitAPI and value to display indicated by ForgeTypeId
|
||||
/// </summary>
|
||||
/// <param name="unit">ForgeTypeId indicates display unit type</param>
|
||||
/// <returns>Ratio </returns>
|
||||
private static double ImperialDutRatio(ForgeTypeId unit)
|
||||
{
|
||||
if (unit == UnitTypeId.Feet) return 1;
|
||||
if (unit == UnitTypeId.FeetFractionalInches) return 1;
|
||||
if (unit == UnitTypeId.Inches) return 12;
|
||||
if (unit == UnitTypeId.FractionalInches) return 12;
|
||||
if (unit == UnitTypeId.Meters) return 0.3048;
|
||||
if (unit == UnitTypeId.Centimeters) return 30.48;
|
||||
if (unit == UnitTypeId.Millimeters) return 304.8;
|
||||
if (unit == UnitTypeId.MetersCentimeters) return 0.3048;
|
||||
return 1;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user