dawcio19933

Help with Export to CAD

Discussion created by dawcio19933 on Jan 11, 2017
Latest reply on Jan 13, 2017 by LukeW

In this script works clip to layer, but not work Export to Cad. I dont know how to do that, layer which have been clip goes to export to CAD

 

import arcpy
import os

arcpy.env.workspace = arcpy.GetParameterAsText(0)
obszar = arcpy.GetParameterAsText(1)
out = arcpy.GetParameterAsText(2)

try:

datasetList = arcpy.ListFeatureClasses()

for dataset in datasetList:

featureClassName = arcpy.ValidateTableName(dataset, out)
outFeatureClass = os.path.join(out, featureClassName)

if dataset != os.path.basename(obszar):
arcpy.Clip_analysis(dataset, obszar, outFeatureClass, "")

except:
print arcpy.GetMessages()

Nowy = arcpy.GetParameterAsText(3)


try:

datasetList2 = arcpy.ListFeatureClasses()

for dataset2 in datasetList2:

arcpy.ExportCAD_conversion(dataset2, "DWG_R2010", Nowy, "Ignore_Filenames_in_Tables", "Overwrite_Existing_Files", "")

except:
print arcpy.GetMessages()

Attachments

Outcomes