ArcObjects is a set of COM-based APIs from ESRI Inc. that are used in several of their products including ArcGIS Desktop, ArcGIS Engine and ArcGIS Server.

learn more… | top users | synonyms (3)

68
votes
5answers
10k views

Accessing ArcObjects from Python?

I would like to be able to script some things that are not 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 ...
27
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 ...
16
votes
9answers
4k views

Getting started with Arcobjects

What is the best route or place to get started with arcobjects if one is not a developer and not aiming to become a developer? I've been using gis professionally for a long time, almost two decades, ...
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 ...
1
vote
2answers
255 views

How to define Subroutines and functions?

I am working in VBA. My error is sub and function are not defined. Here is my code: Private Sub CreateMap(cboDistrict As String) Dim mapDocument As New mapDocument If ...
9
votes
4answers
2k views

Connecting line features and determining the length of the longest line

I have a line feature (see image) representing a river that I created using the Stream_to_Feature tool. The attribute table contains several records representing different lines - the problem is the ...
12
votes
6answers
3k views

ArcObjects Resources

What are the best books/web sites for C# development with ArcObjects? The ArcGIS Resource Center is very helpful, but I am trying to find sources with more examples. Thanks
3
votes
2answers
1k 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 ...
14
votes
2answers
1k views

Calling arcpy/python from .NET?

Are there any available examples that show how python can be integrated into a .NET ArcGIS Addin or Extension? I have a series of python scripts that I would like to call from form events (e.g. button ...
9
votes
3answers
5k views

How does ArcGIS compute the distance between two points with a non-equidistant projection?

This is a follow-up question to my previous one, Can you suggest some well-written introductory texts about coordinate system projections? Let's assume I'm working with the CH1903 map projection, ...
10
votes
2answers
2k views

Issues with geoprocessing with .NET

There are some nice features in ArcToolbox we can use, but for some reason, this is NOT working properly. It doesn't even throw me an error. My software is running inside ArcMap, so no need to ...
5
votes
3answers
2k views

How to use ArcObjects to choose GeoTransformation?

I’m currently building a Desktop add-in tool with ArcObjects that: Asks a user to select a feature class Reprojects the feature class to Web Mercator Executes some geoprocessing The initial ...
3
votes
1answer
728 views

Using annotation layer inside group layer without getting error adding element?

How do you get an annotation layer working inside a group layer? When I try, I get the error message "error adding element". I have a project that requires several annotation layer to be organised ...
2
votes
2answers
680 views

ArcObjects: Alternative workflow to using a SQL query with over 1000 values in IN statement

I have a ListBox listing the unique values of a column in a feature class; the user can select any number of values and click a button to then zoom to the set of features matching those values. A ...
14
votes
3answers
1k views

Algorithm to find out points of inflection for a polyline

I am trying to find out the points of inflection , i.e. points where the curves in a line start and end. If you look at the image, the green line may be a road or a stream, and the black points are ...
5
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 ...
10
votes
2answers
963 views

How to unit test ArcObjects with Mocking?

I'm a huge fan of unit testing, but still make use of a FGDB to grab features for running unit tests against when using the ArcObjects framework. Is anyone successfully using mocking against thinks ...
13
votes
6answers
5k views

Convert between ESRI Geometry and WKT

It seems like there is no means of converting an ArcObjects geometry to the Well-Known Text representation (and vice versa) in ArcGIS ArcObjects API. The only thing I was able to find is conversion to ...
3
votes
1answer
2k views

How do I programmatically create non-feature-linked, simple line callout annotation and set the anchor point?

Vitals: ArcGIS-ArcView 10.0, Python 2.6.5, PythonWin, comtypes I'll start with my main questions: How, using ArcObjects, do I go about creating non-feature-linked geodatabase annotation features ...
5
votes
4answers
353 views

Can I store an ArcObject inside a BLOB or XML field?

I'm having this crazy idea here...Is it possible to store an ESRI object inside a blob field inside a geodatabase? If not, perhaps a serialized XML representation? I'm thinking about storing ...
4
votes
2answers
798 views

Running ArcPy script from ArcObjects?

the standard method requires to run ArcPy script in command 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 env ...
3
votes
1answer
972 views

ESRI Flash Command in custom code

I would like to implement the same flash feature command that ESRI uses when accessing the context menu on a table row. I have used the following successfully to flash a selected feature: ...
3
votes
3answers
2k views

Can you programmatically change the button image for a ESRI.ArcGIS.Desktop.AddIns.Button?

I'm new to the AddIn customization model in ArcGIS 10 and I'm trying to figure out how to change a button image for a button. I'm looking for the equivalent to the BaseCommand UpdateBitmap method and ...
9
votes
1answer
668 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
2answers
598 views

Creating layer from in-memory shape data using ArcObjects?

In my current project, a feature layer is created based on shape data generated after some complicated surface analysis procedure. The sequence right now is like [Surface Analysis Algorithm] -> ...
0
votes
1answer
69 views

Finding points in extent using VBA

Is there a way to select a point from my map's current extent? I want to use ArcObjects to tell me if there is at least one point visible in my extent. I'd like to do this entirely in VBA, and without ...
13
votes
2answers
3k views

How can I create weighted Thiessen polygons?

I have a point shape file and I create Thiessen (Voronoi) polygons programmatically using this scripting syntax: CreateThiessenPolygons_analysis (in_features, out_feature_class, fields_to_copy) ...
14
votes
3answers
2k views

ArcObjects: Memory leak in IFeatureClass.Search (only on SDE with direct connect)

UPDATE 6/30/11: ESRI Support say they have reproduced the issue and have opened a bug report (NIM070156). I have determined that there is a memory leak (in unmanaged heap memory) that occurs when a ...
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 ...
4
votes
2answers
4k views

Remove lock on feature class

When i try to delete a feature class , after or during the use of an Arcgis engine app which uses the same feature class i got an error concerning the lock , so i can't get ride of this lock until i ...
4
votes
4answers
1k views

Exploring ArcObjects through C# or VB from Python background

While I understand that this may be off topic to an extent, I am in a bit of a bind and could use some help directing my thought process and research. I have little programming background aside ...
3
votes
1answer
1k views

Calculate polygon area inside extent

We're using ArcMap 10.0 sp5, creating a tool in c# using the ArcObjects sdk. Is there a built in function or simple set of steps that calculates the area of each feature of a polygon layer within a ...
13
votes
5answers
2k views

Is Hillshade option in ArcMap rubbish or is it me?

Here is a pretty pic of the raster I am using - with no effects applied - just the color ramp and historgram adjusted to show out all the relief - all be it in a very 2D way! I have a raster layer ...
5
votes
2answers
322 views

Near analysis with mixed feature types in ArcObjects

I am trying to emulate the Near (analysis) ArcGIS tool in ArcObjects. http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00080000001q000000 I want to use Mixed Feature Types. I have a ...
4
votes
2answers
485 views

Is IPolygon2.QueryExteriorRingsEx Method not working in ArcGIS version 10.1 SP1?

I am updating my addins from 10.0 to 10.1 and my code is crashing on the IPolygon2.QueryExteriorRingsEx Method. I understand there is something strange going on with this method because Developer ...
3
votes
3answers
3k views

Creating StreetView/Bing Bird's Eye Add-In?

I'm trying to create an Add-In for this tool: Link to Google Maps and Bing from MXD (Streetview and Bird's Eye supported) I'm not receiving an error however my browser is not opening after I select ...
2
votes
3answers
1k views

Export a join table to arcmap

I have shape file (Point) and a table which I join using the following code. public ITable JoinLayer_Table(IFeatureLayer pFeatLayer, IStandaloneTable pStTable) { IDisplayTable ...
6
votes
6answers
5k views

How do I activate a custom ITool from a form without having to add it to a toolbar? (ArcGIS 10 add-in development)

I'm working on an add-in for ArcMap 10.0 that adds a toolbar to ArcMap. One command (OpenModelessDialogCommand) button on that toolbar opens a modeless WinForms dialog, from which a tool (MyTool) can ...
3
votes
2answers
312 views

Listing features in the order they were selected

This is an ArcObjects-specific version of this question: Create Array From Selected Features Based on the Order in Which They Were Selected Is there a way to get the selected FIDs of a feature layer, ...
3
votes
2answers
427 views

Cannot persist to a blob field

Following this initial thread I'm having some problems implementing what was suggested here: Can I Store An ArcObject inside a BLOB? Well, following the link Kirk provided, I've came up with this: ...
3
votes
2answers
198 views

How can I implement Persistance in a Layer Extension?

Last time I checked, arcgis doesn't honor IPersistVariant in layer extensions. Rather advanced code has been provided here showing how to implement IPersistStream. Is there something simpler?
3
votes
2answers
1k views

Accessing ArcGIS layers from separate thread using ArcGIS Engine?

I've got an ArcEngine application, referencing a MXD for it's data (and map display). I'm running a query against all layers, so can take quite some time. I would normally run the query in a ...
2
votes
4answers
863 views

How to distinguish between File and Personal Geodb workspace?

I am looking for a way - given an IWorkspace object - to check if it was created from a Personal-GDB or a File-GDB. I tried using IWorkspace.WorkspaceFactory to check if it's an instance of e.g. ...
1
vote
1answer
899 views

Is there any way to set polygon features fill color and outline programmatically?

By some process I am creating a polygon feature layer. Before adding the layer in the map, I want to set polygon's fill color to no color and set polygon's outline color and width. I am working with ...
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 ...
6
votes
1answer
393 views

Why are annotation features containing both GraphicElement and TextElement objects not drawing in an ArcGIS Server map service?

I am building annotation features with Python/comtypes/ArcObjects. The annotation works great in ArcMap (10.1), but it is does not draw when published to a map service in ArcGIS Server. Each piece ...
6
votes
1answer
2k views

First attempt using ArcObjects: ESRI's Add-ins example unclear

I've come to realize that scripting ArcGIS 10.0 with Python imposes too many limitations for my goals with ArcGIS, so I've decided to bite the bullet and delve into ArcObjects. Apparently, using ...
5
votes
2answers
2k views

How to catch when scale is changed in ArcGIS?

We want to update a combobox so that it always shows the correct scale. If the user zooms-in, out or resizes the control hosting the map. What is the best event or events to catch and use in ArcGIS to ...
4
votes
4answers
2k views

Determine overlapping points using a spatial filter in ArcObject

I have a point layer with thousands of points. Using a spatial filter, I have to find out those points which are intersecting each other. Then the objectid's of the intersecting points should be ...
4
votes
4answers
4k views

How do I remove Schema Locks from a File GeoDatabase in Java in ArcGis 9.3?

I have an application written in Java which uses ArcObjects 9.3. The application accesses a file GeoDatabase. The application produces output in the GeoDatabase that will be accessed by ArcMap. The ...