POST
|
UPDATE!!! WORK!!! I have tried many times and in the end it works. I do not know if I can do that all created CAD files are in one DWG?
... View more
01-12-2017
01:35 PM
|
0
|
1
|
1127
|
POST
|
Unluckily after using your solution the tool clips layers, but doesnt export anything to CAD. Maybe there is some misprint in your code?
... View more
01-12-2017
06:32 AM
|
0
|
3
|
1127
|
POST
|
The point is that I would like to have all the layers that will be clip, have been exported to the CAD file. After opening it in AutoCAD layers are all those clip .shp. It was noticed that the code above cut me only the first 2 layers and creates a CAD file in the folder input, but only 1 clip shp.
... View more
01-12-2017
04:12 AM
|
0
|
1
|
1127
|
POST
|
Thank you for the remark! I appreciate it. I removed the second "try" and "except", but it still does not return my result in dwg format. I do not know how to use a "result" so that my whole clip's passage could be. Could you show me how to edit the code? In the Annex toolbox with this tool. 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):
result = arcpy.Clip_analysis(dataset, obszar, outFeatureClass, "")
result_cad = arcpy.ExportCAD_conversion(result, "DWG_R2010", 'result_cad.dwg')
except:
print arcpy.GetMessages()
... View more
01-11-2017
05:25 PM
|
0
|
3
|
1127
|
POST
|
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()
... View more
01-11-2017
01:39 PM
|
0
|
9
|
2659
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|