The entire extraction and CAD export process can be configured using a JSON configuration file.
A minimal configuration specifies the output file and format:
JSON
{
"outputFile": "C:\\Users\\Public\\Documents\\Layer.dwg",
"outputType": "DwgR2018"
}
Key |
Description |
|---|---|
outputFile |
Path to the output CAD export file (for example, "C:\\Users\\Public\\Documents\\Layer.dwg"). |
outputType |
Output CAD format. Supported values: DwgR2018, DwgR2013, DwgR2010, DwgR2007, DwgR2005, DwgR2004, DwgR2000, DwgR14, DxfR2018, DxfR2013, DxfR2010, DxfR2007, DxfR2005, DxfR2004, DxfR2000, DxfR14, DgnV8. |
seedFile |
Path to the .dwg file used as a seed file for the CAD export. |
autoCreateSeedFile |
Set to true to generate a seed file on the fly during an ad-hoc export. |
useFilenamesInTables |
Set to true to use DocPath values from input feature classes to route output files. |
appendToExistingFiles |
Set to true to append exported data to existing output files. Default is false (overwrites existing files). |
pointDisplayMode |
Sets the PDMODE integer value that controls how point objects are displayed. |
pointDisplaySize |
Sets the PDSIZE decimal value for the display size of point objects. |
lineTypeScale |
Sets the LTSCALE decimal value for the global linetype scale factor. |
Use the layers object to define a dictionary of map layers to export, keyed by the layer name in the current map:
JSON
{
"layers": {
"SBA_Lichtpunkt ohne LuxData": {
...
},
"SBA_Schaltschrank": {
...
}
}
}
Each layer entry supports the following properties:
Key |
Description |
|---|---|
table |
Optional name of the table in the export geodatabase. If no policies are specified, this name is also used as the CAD drawing layer name in the exported file. |
where |
Optional SQL WHERE clause filtering the features to export. If the layer has an active selection in the current map, the selection overrides where and the expression is ignored. |
policies |
Array of export policies controlling how features in the layer are exported to CAD. |
Use the policies array to define rules for how features in a layer are exported:
JSON
{
"layers": {
"SBA_Lichtpunkt ohne LuxData": {
"policies": [
{
"cadLayer": "SBA_Lichtpunkt"
},
{
"cadBlock": "SBA_LPKT_ALLG_SYM",
"where": "SYMBOL = '2400300'"
}
]
}
}
}
Every policy supports an optional where property to restrict which features the policy applies to.
•Field Policy (name and value): Generic policy that sets any reserved CAD field for AutoCAD DWG/DXF formats.
•name: Name of the CAD export control field.
•value: Value to assign to the control field.
•CAD Layer Policy (cadLayer): Sets the target CAD drawing layer name.
•CAD Color Policy (cadColor): Sets the AutoCAD Color Index (ACI) color for exported lines or points.
•CAD Line Width Policy (cadLineWidth): Sets the line width for exported polyline features, specified in the base linear unit of the export coordinate system.
•CAD Line Type Policy (cadLineType): Sets the line type for exported polyline features. If a custom seed file is used, it must contain a line type with this name.
•CAD Block Policy (cadBlock): Sets the CAD block name used to symbolize exported point features. If a custom seed file is used, it must contain a block with this name.