POST
|
I created a new shapefile and using the cursor I'm trying to add data to the new shapefile using an array. When I run the python script this always shows: feat.shape = pointArray File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\arcobjects\_base.py", line 35, in __setattr__ return setattr(self._arc_object, attr, ao) RuntimeError: ERROR 999999: Error executing function. The code snippet for the cursor is (in bold is what seems to be the problem): output = "Points.shp" arcpy.CreateFeatureclass_management("C:/workspace", output, "POINT") cur = arcpy.InsertCursor(output) pointArray = arcpy.Array() # start point start = arcpy.Point() (start.ID, start.X, start.Y) = (1, origin_x, origin_y) pointArray.add(start) # end point end = arcpy.Point() (end.ID, end.X, end.Y) = (2, end_x, end_y) pointArray.add(end) feat = cur.newRow() feat.shape = pointArray cur.insertRow(feat) Any thoughts, I am still new to python. Thanks
... View more
03-31-2014
04:12 PM
|
0
|
2
|
812
|
POST
|
Thanks for the help, it finally worked. I'm new at python for ArcGIS so I am still getting used to the need for spaces and indentations required for scripts.
... View more
03-10-2014
04:14 PM
|
0
|
0
|
612
|
POST
|
This is what I tried as a string: Roofpnts = "elevpntsroof.shp" ParamsRoof = Roofpnts + "elev" + "Mass_Points <None>" arcpy.CreateTin_3d(Roof, Coordinate_System, ParamsRoof, "DELAUNAY") basepnts = "elevpntsbase.shp" ParamsBldg = basepnts + "elev" + "Mass_Points <None>" arcpy.CreateTin_3d(BuildingBase, Coordinate_System, ParamsBldg, "DELAUNAY") and I keep getting this error: ExecuteError: ERROR 999999: Error executing function. Failed to execute (CreateTin).
... View more
03-10-2014
10:47 AM
|
0
|
0
|
612
|
POST
|
Tried this according to other threads and 10.1 help: arcpy.CreateTin_3d(Roof, Coordinate_System, "{0} elev Mass_Points <None>".format(elevpntsRoof), "DELAUNAY") arcpy.CreateTin_3d(BuildingBase, Coordinate_System, "{0} elev Mass_Points <None>".format(elevpntsbase), "DELAUNAY") it did not work, am I doing something wrong - wrong number or value. Thanks
... View more
03-07-2014
05:47 AM
|
0
|
0
|
612
|
POST
|
I am writing a script that includes creating TINs and it won't allow me to use a variable for the input feature class. I get a warning that says "Not a member of none". It works if I hard code the shapefile in the parameters but not when I use a variable. the code snippet that isn't working: # Output TIN BuildingBase = "BldgBase" Roof = "BldgRoof" # Input point feature classes elevpntsRoof = "elevpntsRoof.shp" elevpntsbase = "elevpntsBase.shp" # execute create TIN 3d arcpy.CreateTin_3d(Roof, Coordinate_System, "elevpntsRoof elev Mass_Points <None>", "DELAUNAY") arcpy.CreateTin_3d(BuildingBase, Coordinate_System, "elevpntsbase elev Mass_Points <None>", "DELAUNAY") The error: ExecuteError: Failed to execute. Parameters are not valid. ERROR 000800: The value is not a member of <None>. Failed to execute (CreateTin). I want this script to allow users to input their variables without having to go into the script so far the script only works when I add the feature class path directly to the parameters within the ("elevpntsRoof elev Mass_Points <None>") part of arcpy.CreatTin_3d. This works fine: arcpy.CreateTin_3d(Roof, Coordinate_System, "elevpntsRoof.shp elev Mass_Points <None>", "DELAUNAY") Is it because of the "" or does it not work using variables at all. I have tried no quotes, {}, [], no "" around the variable but nothing has worked. Thanks
... View more
03-07-2014
04:55 AM
|
0
|
5
|
1311
|
POST
|
What about embedding the scene into a webmap with a 2D map with features to be used for the pop-ups but also allowing a user to view and interact with the 3D scene.
... View more
12-10-2013
10:16 AM
|
0
|
0
|
222
|
POST
|
Hi I don't know if this has been mentioned before but I have a question regarding the City Engine Viewer in ArcGIS Online and the JavaScript API. I created for my organization an ArcScene document with 3D models depicting different structures, vegetation, and other elements including a DEM surface, which I can export to a .3ws file in 10.2. What I need to do is to create a web map with the 3d scene that can allow a user to view information about each structure with pop-ups, link to images, other documents, etc. Does the JavaScript API currently allow for a dynamic web map with the .3ws file/City Engine Viewer or is there another (better) way of doing this, especially considering I most likely will not be able to publicly share the scene as required in ArcGIS Online. Unfortunately, I do not have and won't be able to get City Engine. I also know ArcScene exports WRL files but haven't been able to get anywhere with that except viewing it with a viewer. Thanks
... View more
12-10-2013
07:41 AM
|
0
|
3
|
521
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|