|
POST
|
Hi All As suggestions given in the blog i modified the script, But still i am getting the same error please help me when i run the script in python editor with workspaces hardcoded like below, the code executes properly. import arcpy ... import os ... from arcpy import env ... env.overwriteOutput = True ... env.workspace = "D:/Python DVD/Python/Data/Exercise02" ... outgdb = "D:/Data/Test1.gdb" ... print outgdb ... fclist = arcpy.ListFeatureClasses() ... for fc in fclist: ... fcdesc = arcpy.Describe(fc) print fcdesc.baseName print os.path.join(outgdb, fcdesc.baseName) ... arcpy.CopyFeatures_management(fc, os.path.join(outgdb, fcdesc.baseName)) But when i create custom tool using this script i am getting the error import arcpy import os from arcpy import env env.overwriteOutput = True env.workspace = arcpy.GetParameterAsText(0) outgdb = arcpy.GetParameterAsText(1) print outgdb fclist = arcpy.ListFeatureClasses() for fc in fclist: fcdesc = arcpy.Describe(fc) print fcdesc.baseName print os.path.join(outgdb, fcdesc.baseName) arcpy.CopyFeatures_management(fc, os.path.join(outgdb, fcdesc.baseName)) Error is:
... View more
05-23-2016
04:34 AM
|
0
|
3
|
3108
|
|
POST
|
Hi below is my script created for custom tool import arcpy
import os
from arcpy import env
env.workspace = arcpy.GetParameterAsText(0)
outgdb = arcpy.GetParameterAsText(1)
fclist = arcpy.ListFeatureClasses()
for fc in fclist:
fcdesc = arcpy.Describe(fc)
arcpy.CopyFeatures_management(fc, os.path.join(outgdb, fcdesc.basename))
... View more
05-22-2016
10:10 PM
|
0
|
3
|
1812
|
|
POST
|
Hi All I am getting error when running custom created script tool to copy feature classes from folder to geodatabase below is the error Traceback (most recent call last):
File "D:\Python DVD\Python\Data\Exercise02\CopyFeature.py", line 9, in <module>
arcpy.CopyFeatures_management(fc, os.path.join(outgdb, fcdesc.basename))
File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\management.py", line 2429, in CopyFeatures
raise e
ExecuteError: ERROR 000210: Cannot create output E:\ArcPy\ResultFeatures\basin
Failed to execute (CopyFeatures).
Failed to execute (MyCopy). What am i missing, Please help me
... View more
05-20-2016
07:01 AM
|
0
|
13
|
6629
|
|
POST
|
Hi Everyone, I am new to Python, I am creating one empty feature class using python code and trying to create polygon using text file which is having ID, X, Y values as below, my text file points.txt and the code is as follows 1 542935 1619969 2 543015 1619964 3 543079 1619924 4 543095 1619896 5 543107 1619816 6 543099 1619768 7 543067 1619669 8 543047 1619629 9 543007 1619593 10 542979 1619577 11 542923 1619569 12 542883 1619577 13 542810 1619625 14 542738 1619649 15 542698 1619701 16 542690 1619733 17 542699 1619773 18 542719 1619821 19 542775 1619893 20 542883 1619953 21 542935 1619969 >>> import arcpy, fileinput, string, os
>>> from arcpy import env
>>> env.workspace = "D:/Data"
>>> inputfile = "D:/Data/points.txt"
>>> fc = "newpoly.shp"
>>> arcpy.CreateFeatureclass_management("D:/Data", fc, "polygon")
<Result 'D:\\Data\\newpoly.shp'>
>>> cursor = arcpy.da.InsertCursor(fc, ["SHAPE@"])
>>> array = arcpy.Array()
>>> point = arcpy.Point()
>>> for line in fileinput.input(inputfile):
... point.ID, point.X, point.y = string.split(line, " ")
... array.add(arcpy.Point(X, Y))
... cursor.insertRow([arcpy.Polygon(array)])
... fileinput.close()
... del cursor But it is unable to create polygon feature, after running the code "newpoly.shp" is empty with values like FID Shape Id 0 Polygon 0 where am i wrong?, why it is not writing geometry, Please help me Thanks You Sadananad
... View more
05-18-2016
12:19 AM
|
0
|
12
|
9670
|
|
POST
|
Hi All http://xxxx/arcgis/rest/services/yyyy/MapServer/exts/ElevationsSOE_NET/ElevationLayers/0/GetElevations ?geometries=[{\"spatialReference\":{\"wkid\":102100},\"x\":8632023.162152376,\"y\":1333819.1833719583,\"z\":0,\"m\":0},{\"spatialReference\":{\"wkid\":102100},\"x\":8831930.1190614142,\"y\":1388339.2625289687,\"z\":0,\"m\":0}]&f=json i am passing geometry properties like this but getting below error "{"error":{"code":400,"message":"Value cannot be null.\r\nParameter name: geometries"}}" where am i wrong? Please help me.. Thanks in advance
... View more
04-06-2016
12:14 AM
|
0
|
0
|
2560
|
|
POST
|
Hi Miriam Brockmann, I am populating the combobox with jason values as below using web api odata service, this._roadClass = new comboBox({ labelAttr: "queryType", labelType: 'text', placeHolder: "Select Boundary", searchAttr: "queryType", autoWidth: true, onChange: lang.hitch(this, this._onroadClassSelected) }, this.roadClassNode); In the same way i am populating the dijit/Multiselect, but i am not getting, what is wrong here?
... View more
03-02-2016
08:54 PM
|
0
|
0
|
979
|
|
POST
|
Hi All, I have a small problem with storing multiselect in dojo, I have a combobox and i am filling that with json values. But i am having a problem with populating multiselect, Please help me. I am using web api odata service to get values from the database and populating them into dojo multiselect.
... View more
02-29-2016
08:40 PM
|
0
|
3
|
3038
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 03-21-2022 07:27 PM | |
| 1 | 07-23-2015 03:31 AM |
| Online Status |
Offline
|
| Date Last Visited |
08-02-2023
01:24 PM
|