TransWikia.com

Export to CAD error

Geographic Information Systems Asked by Ahmet Kasap on December 17, 2020

I want to export to CAD the layers I select from the map screen using Python code. If there is no feature of the features I have defined in the code in the area I selected on the screen (I have defined the tree layer in the code, but there is no tree in the area I selected), it exports the entire feature. This is a problem for me.

Do you have any suggestions for the solution of this problem?
I share the sample code blog below with you

import arcpy
mxd = arcpy.mapping.MapDocument("CURRENT")
in_features=arcpy.GetParameterAsText(0)
df = arcpy.mapping.ListDataFrames(mxd, "Layers")
in_features = "CBS_PE_Hat","CBS_PE_Vana","CBS_SKID_PE","CBS_Regulator","CBS_Celik_Vana","CBS_SKID_Celik","CBS_Celik_Hat"
output_type = "DGN_V8"
output_file = "D:EXPORTCADexport.dgn"
try:
  # Process: Export to CAD
  arcpy.Delete_management("D:EXPORTCADexport.dgn")
  arcpy.ExportCAD_conversion(in_features, output_type, output_file, "USE_FILENAMES_IN_TABLES", "OVERWRITE_EXISTING_FILES", "")
except:
      # If an error occurs while running a tool print the message
      print arcpy.GetMessages()

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP