Batch 'Export to CAD' Dynamic Naming

936
3
Jump to solution
01-13-2023 03:29 PM
mlyons
by
New Contributor II

I would like to run a batch 'Export to CAD' geoprocessing tool on a group of line feature classes. Using the dynamic naming %Name% variable, it names the single output file after the 'Batch Output Type' field and not the names of the input feature classes.

For example, the "residences" input feature class is to be saved as a 2018 DXF file. The output file name is called "test_%Name%.dxf". Ideally, the output file name would be "test_residences.dxf". However, the %Name% variable names the file "test_DXF_R2018.dxf". This applies for all other file types able to be used. Pics attached.

This definitely seems like a bug. Would love a fix for this.

1 Solution

Accepted Solutions
BarryNorthey
Occasional Contributor III

I made a simple model with the Export to CAD GP tool and the Parse Path Utility and then ran the model tool in batch mode. Seems to work as there is no conflicting iterator in the model. 

 

BarryNorthey_0-1673931473829.png

BarryNorthey_1-1673932069008.png

 

View solution in original post

0 Kudos
3 Replies
mlyons
by
New Contributor II

Batchparameter.PNG

Update:

I believe the issue is stemming from the batch parameter selected for the batch tool. The %Name% variable is driven by the batch parameter. For the Export to CAD tool, the only two batch parameters that can be selected are 'Output Type' and 'Seed File'. There is no option to select 'Input Dataset' which would iterate the batch tool by layer and substitute %Name% with the layer name.

0 Kudos
BarryNorthey
Occasional Contributor III

I made a simple model with the Export to CAD GP tool and the Parse Path Utility and then ran the model tool in batch mode. Seems to work as there is no conflicting iterator in the model. 

 

BarryNorthey_0-1673931473829.png

BarryNorthey_1-1673932069008.png

 

0 Kudos
mlyons
by
New Contributor II

Thanks for running through that for me! I guess this is a sign to start learning models

0 Kudos