Tagged Questions
1
vote
0answers
74 views
how can i export a shapefile
hi I want to select the cities that exist in Morocco and export it to a shape file and I used this code but its not working, it gives me an error:
code:
import arcpy
from arcpy import env
...
10
votes
6answers
464 views
How do I iterate through every cell in a continuous raster?
See this link for more details.
The Problem:
I want to loop through a continuous raster (one that has no attribute table), cell by cell, and get the value of the cell. I want to take those values ...
1
vote
0answers
61 views
How to create a schematic view of a line feature?
DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far…
I have a line feature (polyline with curves) in ArcGIS Desktop, and I want to create a linear representation (straigth line) of the ...
1
vote
1answer
41 views
Arcobjects- IAnnotateLayerPropertiesCollection2.QueryItem in Python
Anyone tried access label properties trough ArcObjects with Python?
I try to obtain reference to label object with IAnnotateLayerPropertiesCollection2.QueryItem, but when I do:
pA = ...
5
votes
2answers
578 views
What are pros and cons of Python add-ins vs .NET add-ins to ArcGIS for Desktop?
I found in ESRI .NET help:
Python
All ArcGIS Desktop applications include an embedded scripting language called Python. Many areas of ArcGIS—particularly geoprocessing—are accessible through ...
5
votes
4answers
332 views
Migrate in a new programming GIS language
The last five years I have been working with VBA and ArcObjects for developing a specific application within ArcGIS. That project that began around 2008-2009 carried out with VBA and ArcObjects which ...
3
votes
1answer
116 views
ArcObjects (VB.Net) Python Integration with object passing?
This link illustrates one method for calling python scripts from within an ArcObjects environment. The results of these tasks are returned as strings. I wonder if it is possible to call a python ...
8
votes
2answers
435 views
What are mystery green lines in Layout View produced during ArcObjects script execution?
Could any of ArcObjects guru tell me, what are these green lines on my Page Layout and what to do, or not to do, so they do not appear? See image attached.
I do used ArcObjects from Python. My script ...
2
votes
1answer
157 views
Arcobjects: DisplayTransformation.FromMapPoint() transforms wrong
I want to transform map coords into page coords in ArcObjects in Python. So I do, say:
>>> pApp = NewObj(esriFrame.AppROT, esriFrame.IAppROT).Item(0)
>>> pDoc = pApp.Document
...
1
vote
1answer
214 views
.Net to Python - ArcGIS Add-in
Background:
I have been tasked with porting a 9.3 .NET toolbar to ArcGIS 10 / 10.1. I am a dyed in the wool Python programmer and, while digging through someone else's .Net is interesting, it isn't ...
0
votes
1answer
52 views
How to use a property of a different interface for a created ArcObject
I have created an arc based three points (from point, through point, and to point). To create the arc I used this code:
import arcpy, comtypes.client
import comtypes.client.CreateObject as ...
3
votes
2answers
960 views
ArcObjects + comtypes at 10.1
Has anyone played around with using ArcObjects in Python at version 10.1?
I am having all sorts of problems, such as TypeErrors when wrapping the ESRI OLB modules and AttributeErrors when attempting ...
0
votes
1answer
92 views
How can i use ihookhelper interface in python?
I use ArcObject in python to develope a tool. I import comtypes in python to access the arcmap layers in python and use ifeaturelayer interface. I have to set featurelayer to ...
1
vote
1answer
215 views
Arcobjects in Python, inherit from Abstract Class
As for question, I am trying to adjust Grid Map labels via Arcobjects with Python. For now I do have:
from comtypes.client import CreateObject, GetModule
import arcpy
def CType(obj, interface):
...
1
vote
1answer
212 views
Grid labels in ArcGIS, overlapping issues
I do have 3 grids made by Grids menu in data frame properties. I do need them to display in certain layout and also to behave accordingly to couple of rules (overlapping issues), so I can automate my ...
3
votes
1answer
388 views
Is it possible to create a new ArcGIS toolbar with new tools using Python?
I have written a number of fairly-simple python functions using arcpy which help a user significantly when performing a certain workflow using various tools (both ArcGIS toolbox tools and external ...
3
votes
2answers
706 views
Running Arcpy script from ArcObjects
the standard method requires to run arcpy script in commande line, i've struggled with it to run but without a result, i can import arcpy, set the workspace to the geodatabase path and describe the ...
7
votes
1answer
1k views
Add layer to open mxd using ArcObjects from outside the map document crashes ArcMap
I have an Access database (MS Access 2010) that allows users to enter a variety of land treatment information including associated points, lines, or polygons which users can select and the database ...
2
votes
2answers
126 views
Finding Two locations with a conditional search on DEM
I want to find two locations H difference in elevation between two locations on a DEM.
Ex: point A and B are my output after search on DEM. conditions are (1)buffer R distance around point A and (2) ...
7
votes
2answers
710 views
How to determine on which side of a line a polygon feature falls?
I have parcel data intersecting line data. In the parcel data there are some parcels that don't intersect the line. How could I programmatically figure out if the non-intersecting parcel is on the ...
9
votes
1answer
569 views
Arcobjects in Python: assign interface to objects with feature (shape) geometry
I am trying to use ArcObject in Python. I do have problem with assigning an interface (i.e. IZ.InterpolateZsBetween) to my object with geometry data, code is:
from Comtypes.client import ...
2
votes
1answer
114 views
IZ.InterpolateZsBetween, how to use it for multiple parts in polyline
I want to interpolate Z values for the vertexes in the polyline. Shape file contains few polylines. Polylines do have certain vertexes with correct Z value, others do not have Z value (set to ie. 0). ...
3
votes
1answer
351 views
Python metes and bounds automation in ArcMap
We are using the metes and bounds in old pipeline alignment sheets, when in an edit session in ArcMap, to plug in the "direction/length" values to generate the line segments. Does anyone have any ...
4
votes
1answer
461 views
Determining ESRI File Geodatabase release version?
Is there any method in Python, ArcObjects, or the File GDB API for determining the release version (9.3, 10.0, etc.) of a file geodatabase? There is a need to find all of our shared 10.0 version file ...
3
votes
2answers
836 views
Fastest way to create an ESRI Grid and populate cell values?
In terms of processing speed what's the fastest way of creating and then adding values to a raster?
The values will originally come from ASCII files which can be about 500MB in size - ideally I ...
3
votes
1answer
640 views
Can ArcGIS Desktop 10 Add-in Use IronPython?
Coming from the same background as the original poster in this thread, I wonder if anyone has had any success creating an Arc10 Add-In using IronPython.
I have been able to access ArcObjects via ...
26
votes
4answers
3k views
Performance of ArcGISScripting and large spatial data sets
I am currently writing a python script using the arcgisscripting module to process a reasonably large data set (~10,000 records in total) normalised over a small number of tables, 8 in total. The ...
6
votes
4answers
2k views
Programmatically edit/update metadata in ArcGIS 10
Has anyone succeeded in programmatically updating metadata in ArcGIS 10? Considering using Python/arcpy but ArcObjects (C# or Python/comtypes) is also a possibility.
I need to update both the FGDC ...
2
votes
1answer
324 views
ArcObjects ITextSymbol.GetTextSize in Python revisited: usage with StartDrawing and FinishDrawing methods
I am using ArcGIS 10.0/ArcObjects and Python 2.6. I am trying to get the usage of the ITextSymbol.GetTextSize method correct. The syntax, as established in an earlier question, is:
dblx, dbly = ...
4
votes
2answers
1k views
Programmatically alter AliasName for fields defined in layer file (not underlying source)
Is there a way to alter the AliasName on a layer file only, and not the underlying shapefile or feature class? I have a few hundred layers that define joins between hundreds of tables with census data ...
4
votes
3answers
2k views
ArcMap/ArcObjects - Drawing graphics onscreen: Explanation or tutorial for Draw/Refresh/PartialRefresh methods?
I find myself woefully lacking in understanding of when, why, and how (which type) to do screen draw/refresh/partial refresh. For instance, in a standalone Python script outside the application ...
5
votes
3answers
2k views
Python, comtypes and ArcObjects: Error creating AppROT object
I am experimenting with comtypes and ArcObjects under Python 2.6.5 and ArcGIS 10 SP1. I'm using the pure Python method to wrap the ArcObjects OLBs described in this answer, but getting an error in the ...
4
votes
1answer
201 views
ArcObjects ITextSymbol.GetTextSize in Python: Why are the out params equal to 0?
This is related to the question I asked earlier about the syntax for this method under Python and comtypes. Now that I know the syntax and am trying to use it, the returned out params are equal to 0. ...
3
votes
1answer
662 views
ArcObjects: How to get from IFeatureClass on annotation feature class to IAnnoClass?
I am working in Python 2.6 and ArcGIS 10.0 through comtypes, so I have full ArcObjects access. (See the answer I tacked onto the related question "How do I access arcobjects from python?") That ...
3
votes
1answer
244 views
ArcObjects ITextSymbol.GetTextSize in Python: How do I define two input variables that get populated by the method?
I am using Python 2.6 and ArcObjects in ArcGIS 10.0 to build and draw, among other things, graphic text on the current display. At one point I need to use the ITextSymbol.GetTextSize method. In a ...
1
vote
1answer
534 views
How to create a pop-up box if a condition is true in a table? (ArcMap 10)
I'm creating a script that will grab layout data from a table for the current Building Number of the current building my map series is on. It works fine, but I need it to pop up a window if multiple ...
8
votes
3answers
7k views
How to create a button in Arcmap 10 to run a Python program?
I have a script that I want to run within ArcMap when a button in a toolbar is clicked, and so far I have only been able to make the script into a script tool. I need it to run as a command, not as a ...
1
vote
2answers
985 views
unique value symbolize layers from a lookup table
I need to create a large number of Arcmap layer files (v9.3 or 10), perhaps a hundred, from lookup tables. I don't have to set the symbol patch itself, that can be random, but I do need the value and ...
1
vote
2answers
521 views
ArcObjects table views or sqlite3 in Python?
Given a larger csv (1000+ points) with attributes, I need to do both attrbute and spatial queries on the data. Would it be faster to read the points into an xy feature class, and do the spatial and ...
0
votes
0answers
360 views
68
votes
5answers
10k views
How do I access ArcObjects from Python?
I want to be able to script some things that aren't exposed via arcgisscripting or ArcPy. How do I access ArcObjects from Python?
I'm working with ArcGIS Desktop 9.3.1 right now, but will be ...