Questions tagged [arcobjects]

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.

Filter by
Sorted by
Tagged with
143 votes
5 answers
29k 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?
matt wilkie's user avatar
  • 28.1k
11 votes
2 answers
4k views

Guidelines for using ArcObjects from Python

By far, Accessing ArcObjects from Python? is my most read and referenced Q&A on GIS Stack Exchange. In spite of that success, it's probably one of my weakest areas when it comes to actual use. A ...
matt wilkie's user avatar
  • 28.1k
6 votes
3 answers
4k 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 ...
blah238's user avatar
  • 35.7k
22 votes
3 answers
7k 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 ...
Devdatta Tengshe's user avatar
11 votes
4 answers
24k 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 ...
geogeek's user avatar
  • 4,546
17 votes
2 answers
9k views

Create weighted Thiessen polygons?

I have a point shapefile and I create Thiessen (Voronoi) polygons programmatically using this scripting syntax: CreateThiessenPolygons_analysis (in_features, out_feature_class, fields_to_copy) ...
Demetris's user avatar
  • 1,029
8 votes
3 answers
6k views

Using 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 ...
rgwozdz's user avatar
  • 807
26 votes
9 answers
8k 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, ...
matt wilkie's user avatar
  • 28.1k
14 votes
2 answers
4k views

Avoiding fails from ArcObjects 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 ...
George Silva's user avatar
  • 6,298
6 votes
2 answers
3k views

ArcObjects + comtypes at 10.1 and newer

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 ...
blah238's user avatar
  • 35.7k
14 votes
6 answers
9k views

ArcMap Add-in with app.settings not recognizing app.config changes?

I have developed an ArcMap Add-in which requires a configuration file. After spending a while trying to read config values from a single App.Config file (and always getting null) I believe that the ...
tomfumb's user avatar
  • 3,668
13 votes
3 answers
5k 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 ...
Radar's user avatar
  • 10.7k
10 votes
3 answers
9k 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, ...
stakx's user avatar
  • 1,141
2 votes
1 answer
11k views

Downloading ArcObjects SDKs for .NET?

Can anyone can suggest where I can freely download ArcObjects SDKs for ArcGIS? I am using version 10.2.
Arun's user avatar
  • 1,462
13 votes
8 answers
6k views

ArcObjects Resources [closed]

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.
Britt Wescott's user avatar
17 votes
6 answers
13k views

Converting between Esri Geometry and WKT using ArcObjects?

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 ...
Petr Krebs's user avatar
  • 10.3k
16 votes
3 answers
4k views

Addressing Memory leak in IFeatureClass.Search (only on SDE with direct connect) of ArcObjects?

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 tool in my .NET/C#...
blah238's user avatar
  • 35.7k
12 votes
5 answers
9k views

Programmatically edit/update metadata in ArcGIS?

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 ...
blah238's user avatar
  • 35.7k
5 votes
2 answers
3k 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 ...
geogeek's user avatar
  • 4,546
3 votes
2 answers
2k 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 ...
blah238's user avatar
  • 35.7k
3 votes
1 answer
646 views

ArcObjects/Python: Add JPG to layout

I am attempting (and failing) to add an image to a map layout using ArcObjects via Python comtypes. I do need to run this outside of ArcMap (i.e. not in the ArcMap Python window). The basic idea is: ...
phloem's user avatar
  • 4,678
1 vote
1 answer
2k views

Change The Label Field In GeoFeatureLayer

I currently have a basic shapefile that's a map of the United States. It has the name of the states, populations, and other pieces of information that I can get the names of via the following code: ...
ist_lion's user avatar
  • 511
15 votes
5 answers
5k views

Using Hillshade option in ArcMap?

Here is a pretty pic of the raster I am using - with no effects applied - just the color ramp and histogram adjusted to show out all the relief - albeit in a very 2D way! I have a raster layer that I ...
Vidar's user avatar
  • 1,860
11 votes
5 answers
10k views

Activating custom ITool from form without adding it to ArcMap AddIn toolbar?

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 ...
stakx's user avatar
  • 1,141
10 votes
2 answers
2k 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 ...
BlinkyBill's user avatar
  • 1,163
7 votes
4 answers
646 views

Storing ArcObject inside BLOB or XML field of geodatabase?

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 IFeatureRenderers inside these fields. ...
George Silva's user avatar
  • 6,298
6 votes
5 answers
2k views

Measuring draw time of layer in ArcMap?

I'd like to quantitatively measure the display performance of mosaic datasets, image service layers, raster layers, feature layers, etc. in ArcMap 10. How can I measure the draw time of a particular ...
blah238's user avatar
  • 35.7k
6 votes
3 answers
3k views

Is it possible to target an ArcMap add-in to an earlier version?

My development environment is Visual studio 2010 with ArcGIS Desktop 10.1 installed. I need my add-in to support 10.0 AND 10.1. Right now, if I try to install it on ArcMap 10.0, it fails. Is it ...
Goldorak84's user avatar
  • 1,274
6 votes
3 answers
3k 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 ...
celticflute's user avatar
  • 1,622
5 votes
3 answers
4k 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 ...
Jay Cummins's user avatar
  • 14.6k
4 votes
2 answers
1k 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 ...
Jakub Sisak GeoGraphics's user avatar
4 votes
4 answers
7k 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 ...
Bill's user avatar
  • 161
3 votes
1 answer
1k views

Can I use an Update cursor with a versioned feature class which has attachments in ArcObjects .NET

I have a problem with my code (C# ArcObjects 10.1). We are trying to update and insert 10 - 15 rows at a time into a feature class hosted in ArcSDE 10.1 on SQL Server 2008 R2. We have a feature class ...
leinad13's user avatar
  • 213
2 votes
1 answer
2k views

ArcObjects: Setting image of a command button to a partially transparent bitmap

In an ArcMap 10 add-in, I am attempting to create a toggle button of sorts whose image changes based on the button's state. This answer describes how to set an add-in button's image programmatically ...
blah238's user avatar
  • 35.7k
2 votes
2 answers
2k 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] -> [...
Exile79's user avatar
  • 495
0 votes
1 answer
211 views

Finding points in extent using VBA [closed]

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 ...
Automatic Bazooty's user avatar
12 votes
11 answers
10k views

Learning .NET for ArcGIS (mainly Desktop) use

I have basic programming skills (I program simple vba python and lisp scripts and had gone through a java course a long time ago), but it seems to me (judging by ESRI publications) that there is no ...
11 votes
1 answer
628 views

Using Python to disable Scale map elements proportionally to changes in page size?

I am changing sources on MXDs in differents offices using ArcPy and ArcGIS 10.0. As observed here, the printer settings revert to the default printer when the instruction mxd.save() is sent. Losing ...
Hélène's user avatar
  • 1,161
10 votes
3 answers
12k views

Creating button in ArcMap to run 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 ...
Tanner's user avatar
  • 7,345
10 votes
1 answer
1k 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 CreateObject,...
Tomek's user avatar
  • 2,923
7 votes
2 answers
6k views

Exporting selected features to a new shapefile

I have a street layer and I only need to export a subset of features to a new shapefile where the "TestDone" attribute field is not '0' (Zero). My current code (which is pasted below) exports the ...
user1473's user avatar
7 votes
2 answers
1k views

Referencing ArcMap in class library using ArcObjects?

I have created multiple ESRI addins, where the same code is used. I have created a class library, which I can reference rather than duplicating code. I have the following in my ESRI addin code which ...
MapMan's user avatar
  • 2,144
7 votes
2 answers
6k views

Finding path where add-ins are installed for ArcGIS Desktop?

I see that my add-ins are installed to C:\Users\Me\AppData\Local\ESRI\Desktop10.0\AssemblyCache{6C90269B-D233-4122-3747-C2AE1131E22C} Is it possible to find that file path from within the Add-in ...
user4979's user avatar
7 votes
1 answer
1k views

Algorithm to fill the gaps adjacent to parcels

I would like to find a way to fill the gaps between the road and its surrounding parcels, like described in picture below: I have different parcels like A and B , i want to fill the gaps by adding ...
geogeek's user avatar
  • 4,546
6 votes
6 answers
2k views

How do I remove a join (between a standalone table and a feature layer) with ArcObjects?

I already know how to do a table join with ArcObjects, via the IDisplayTable, IMemoryRelationshipClassFactory etc. interfaces. Here are some links to resources that have example code for this: "...
stakx's user avatar
  • 1,141
6 votes
3 answers
3k views

Drawing perpendicular lines at start and end of lines using ArcGIS Desktop? [closed]

I have some lines. I want to draw perpendicular lines at the start and end of the lines, on both sides of the lines. Can somebody help me in Python? I am using ArcMap.
Marjo van Balen's user avatar
6 votes
2 answers
2k 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 ...
Conor's user avatar
  • 3,022
6 votes
6 answers
12k views

ArcObjects - Create and Draw a Transparent Polygon

I'm trying to create a transparent Polygon in ArcMap; however, it's never transparent. Here's the code I have. // Create polygon IPolygon polygon = new PolygonClass(); // create & add points,......
ist_lion's user avatar
  • 511
6 votes
1 answer
830 views

Annotation features containing both GraphicElement and TextElement objects not drawing in 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 ...
celticflute's user avatar
  • 1,622
6 votes
6 answers
6k views

How to compile an ArcGIS Desktop add-in in Visual Studio 2013

I have several projects made in Visual Studio 2010, those projects are ArcGIS Desktop Add-in's. I have been change of computer, and my new one only have Visual Studio 2013 due to some company politics ...
XtianGIS's user avatar
  • 782

1
2 3 4 5
7