Using ModelBuilder to export data to CAD

This workflow demonstrates how you can use ModelBuilder to automate a workflow that utilizes both the Make Feature Layer tool and the Export To CAD tool.

This example builds a definition query to export a subset of features to a CAD file. The input feature class name is Parcels. Substitute the name of your feature class.

Start ArcMap and add data

Steps:
  1. Start ArcMap by clicking Start > All Programs > ArcGIS > ArcMap 10.
  2. Click OK on the Getting Starteddialog box to accept the default geodatabase for this map.
  3. Add the Parcels feature class to ArcMap.

Create a toolbox and a Model

Steps:
  1. In the Catalog window, navigate to the folder or geodatabase where you want the toolbox to be saved.
  2. Right-click the folder or geodatabase, and click New > Toolbox .
  3. Right-click the toolbox, click Rename, and type MyToolbox.
  4. Right-click the toolbox you created, and click New > Model.

    This creates the model and opens ModelBuilder.

Add the Make Feature Layer tool

Steps:
  1. Using the Search window Search Window, find the Make Feature Layer tool, and drag it onto the canvas.
  2. Double-click Make Feature Layer to open the dialog box.
  3. Click the Input Features drop-down arrow, and choose the Parcels feature class.
  4. Accept the default Output Layer name Parcels_Layer.
  5. Click the Expression SQL button SQL Query Builder to open Query Builder.
  6. Clear any existing values in the Expression text box.
  7. Double-click a field name in the Fields list that contains the values you want to use in your query. This adds the field name to the Expression text box.

    For example [proptype].

  8. Click an operator button such as equal Equal to add the operator to the expression.
  9. Click the Get Unique Values button.
  10. Double-click an attribute value from the list that you want use as your selection criteria.

    For example, the expression "proptype" = 'residential' selects only the features with an attribute value that equals residential in the proptype field. This completes the SQL statement.

  11. Click OK to close Query Builder and add the SQL statement to the Expression text box.
  12. Click OK to close the tool dialog box.

Add the Export to CAD tool

Steps:
  1. Using the Search window Search Window, find the Export To CAD tool, and drag it onto the canvas.
  2. Click the Connect button Add Connection on the toolbar.
  3. Click Parcels_Layer, click Export to CAD, then click Input Features on the shortcut menu.
  4. Double-click Export to CAD to open the dialog box.
  5. Click the Input Feature drop-down arrow, and choose the variable Parcels_Layer.

    Variables are identified with blue circular arrows.

  6. Click the Output Type drop-down arrow, and choose a CAD format.
  7. Click the Output File browse button Browse, navigate to a folder, type the filename, and click Save.
    • Or accept the default path and filename.
  8. Click OK to close the dialog box.

Run your model

Your model should contain components similar the example below:

MyModel

Steps:
  1. Click the Run button Run from the toolbar to run the model.
  2. Drag the newly created CAD dataset into ArcMap to verify your results.

To further automate this process, you can expose parameters in the model to prompt you for input. Alternatively, you can use Python to perform this workflow as a script.

Related Topics


Published 6/8/2010