POST
|
Thanks! Your code was helpful to find the reason why my code failed (ReturnMessages) Piotr
... View more
06-07-2011
07:46 AM
|
0
|
0
|
345
|
POST
|
Hi! I try to call geoprocessing procedure SelectLayerByLocation but I got COMException error (HRESULT E_FAIL). I also tried some other geoprocessing procedures (Buffer) and it run well. Here is code: ... ESRI.ArcGIS.DataManagementTools.SelectLayerByLocation SelectInWorkLayerBuffer = new SelectLayerByLocation(); SelectInWorkLayerBuffer.in_layer = net_layer; SelectInWorkLayerBuffer.overlap_type = "INTERSECT"; SelectInWorkLayerBuffer.select_features = work_layer_buffer; SelectInWorkLayerBuffer.selection_type = "NEW_SELECTION"; gp.Execute(SelectInWorkLayerBuffer, null); //COMException Any idea? Piotr
... View more
06-03-2011
01:44 PM
|
0
|
3
|
491
|
POST
|
Thanks Dan! I "repaired geometry" and it helped. I did it for the first layer and I hope It'll work for other layers too. That's my first task in ArcGis so I had no idea what to do 😉 Thanks Piotr
... View more
05-25-2011
12:09 AM
|
0
|
0
|
755
|
POST
|
Hi getPart() and getPart(0) return the same result: nothing - and that's my problem. Piotr
... View more
05-24-2011
07:41 AM
|
0
|
0
|
755
|
POST
|
Thanks ... but your code doesn't work the same way as mine. Me and you call getPart() function and it returs nothing (partCount returns 0 and pointCounts returns nonzero value). As I said my polygons are properly displayed in ArcScene, ArcEditor. Piotr
... View more
05-24-2011
05:07 AM
|
0
|
0
|
755
|
POST
|
Hi! I've got layer of polygons and I'm trying to read with py script all shapes. But for almost all shapes I can't read their geometries (getPart() returns nothing - I've checked partCount returns 0, but pointCount nonzero values) Of course all objects are displayed well in ArcEditor I use code similar to: import arcpy # Identify the geometry field # desc = arcpy.Describe("myLayer") shapefieldname = desc.ShapeFieldName # Create search cursor # rows = arcpy.SearchCursor(infc) # Enter for loop for each feature/row # for row in rows: # Create the geometry object 'feat' # feat = row.getValue(shapefieldname) pnt = feat.getPart() # Print x,y coordinates of current point # print pnt.X, pnt.Y What is going on? Any idea? Piotr
... View more
05-24-2011
03:47 AM
|
0
|
8
|
1401
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|