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)

4
votes
2answers
95 views

Given a collection of IPoints is there a quick way to get the extent that contains them?

I have a bunch of IPoints. I need an extent which contains all of them. Is there a quick way to do it? I had the idea of converting them to screen coordinates and then figuring it out manually but ...
4
votes
3answers
287 views

Maximum length of WHERE clause with IN statement

I need to get all features from feature class where their field value matches to input array. To achive this one may set IQueryFilter.WhereClause property similar to 'FIELD_NAME IN (array[0], ...
4
votes
2answers
999 views

Split a Polyline into small segments

I am writing an addin, which needs to split a polyline into a number of segments taking the number of segments as an input from user. How can I accomplish this?
4
votes
2answers
482 views

ArcObjects: How to measure the draw time of a 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 ...
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
3k views

Sum the values of a single raster and output the value as a number?

I have a floating point raster and have applied a conditional to it in order to only extract the positive values, so there are 'no data' "holes" in the raster. I simply need to sum the values from ...
4
votes
1answer
237 views

CustomLayer Draw Com Exception

I'm trying to create a custom layer, nothing crazy just press a button and have something show up on the display and also have the layer display in the TOC. Well, the layer shows in the TOC but ...
4
votes
2answers
246 views

How do you determine if feature is editable?

I am using the FocusMap.FeatureSelection to return all the currently selected features. I want to process only the currently editable features and leave the remainder alone. How can I quickly ...
4
votes
2answers
929 views

Comparing two featureclasses using C#

I'm sorry, I know this is a pretty simple question but am having trouble getting this to work. Basically, I have 2 linear featureclasses and they both have the same fields and spatial reference. FC1 ...
4
votes
3answers
2k views

Delete a feature data set in SDE 10 programmatically

Is there a way to delete a feature data set and all of its feature classes programmatically either by using custom code or pre-existing command line tools? There is a tool provided by SDE called ...
4
votes
2answers
2k 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
2answers
619 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 ...
4
votes
2answers
3k views

How do I change the targeted .NET 4.0 Framework to version 3.5 in an existing VS 2010 EXPRESS project?

I am upgrading from ArcGIS desktop 10.0 to 10.1 and I have a bunch of addins developed in VS 2008 Express using ArcObjects 10.0. I would like to upgrade everything to 10.1 using VS 2010 Express. I ...
4
votes
2answers
587 views

How to select features that intersect but don't touch (using ArcObjects)?

So how do I do that? ArcMap's Select By Location selects also all features that touch, but I only need the ones that actually intersect the area. I currently use ...
4
votes
1answer
437 views

Programatically take screenshot of map extent in ArcMap 9.3

Is it possible to programatically capture a screenshot of the current map extent (the map area with any active displayed layers) in ArcMap with the ArcObjects .NET SDK?
4
votes
1answer
110 views

Is it possible to access the Catalog window programmatically in ArcMap?

Specifically, I would like to get the selected object, similar to the way you do in ArcCatalog through IGxDialog.SelectedObject. Is there a way to do this? So far I can get the Catalog ...
4
votes
2answers
1k 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 ...
4
votes
4answers
492 views

How to get exact ISymbol image size in pixels

I found the next code to convert ISymbol into bitmap image, but how to know the suitable image size? (suppose we have a ITextSymbol) private static Image PointSymbolToImage(ISymbol symbol, Size ...
4
votes
1answer
927 views

ArcObjects - Create a map in the background from layers and save as JPG

Given a series of map layers is it possible to arrange them in some order, add basic map features (north arrow, scale bar) and then save the result as a JPG. I'd like to accomplish this in the ...
4
votes
2answers
1k views

Adding data from a SQL Server Spatial database to ArcMap or ArcEngine application with ArcObjects for better performance

I have an ArcSDE geodatabase stored in MS SQL Server 2008 R2. The datasets in this geodatabase range from 10 record to 7 million records and there is a mixture of tables and spatial datasets (SQL ...
4
votes
1answer
1k views

How to run VB scripts in ArcGIS?

Some questions about VB scipts: Can I read and modify the code of a VB script? If the answer is yes, how can I do it? How can I run a VB script? Can I use it as a VBA code eg.using variables instead ...
4
votes
1answer
798 views

Edit SDE table with ArcObjects

The link below provides a code snippet for editing an SDE table with ArcObjects. Are there any other or newer code examples out there of how to edit a SDE table by using ArcObjects? Edit SDE ...
4
votes
3answers
1k views

Problem creating a point IFeatureClass

I'm trying to create a point IFeatureClass, but my code doesn't work. Public Function CreatePointFeatureClass(ByVal featureClassName As String, _ ByVal ...
4
votes
2answers
1k views

Get Database Table Name From Layer Name in ArcObjects

I am using ArcObjects v10.0 with a SQL Server 2008 database. Given the name of a Layer, is there a way for me to extract the corresponding name of the database table that represents that Layer? The ...
4
votes
5answers
664 views

Intersection of two lines tool

Is there any way to make intersection of two lines tool with extending lines option, so the result would be a point. the hardest part is when the lines have to be extended to intersect. the tool will ...
4
votes
2answers
709 views

How to find self-intersecting polylines using ArcObjects?

If I have a polyline, how do I figure out whether it is self-intersecting? I tried to use ITopologicalOperator.IsSimple Property, but it always returns true. Are there any ways of doing these kind ...
4
votes
2answers
854 views

A bug in ESRI Line Geometry WKB that adds needless, trailing 0's behind otherwise valid WKB?

[Update 7.13.2012] My coworker noticed the the ESRI Line WKB is malformed contains unspecified trailing data, and since he's not active on GIS.SE, I posted his remarks as an answer. I'll wait a few ...
4
votes
2answers
1k views

Perform a spatial join in C# with ArcObjects

I feel like this has to be on the internet somewhere, but I haven't been able to find it. I'm attempting to perform a spatial join on a polygon and point layer. My goal is to push the polygon's ID ...
4
votes
1answer
583 views

ArcObjects joins and non-persistent fields after joining to multiple tables

I have inherited a truly awful and very large ArcObjects project that was originally written in VB and then ported to C#. Apparently the source code I have been given is not the latest version and I ...
4
votes
2answers
4k views

ArcObjects - Finding the intersection of a polyline and polygon?

I have a polyline and polygon. The polyline will intersect the polygon at two or fewer points. I would like to get these intersection points as X and Y values. EDIT: Here is a quick code sample using ...
4
votes
2answers
937 views

MapScale not being persisted properly in mxd when programmatically changed outside of ArcMap environment

I am trying to change the scale of a map in an mxd OUTSIDE of ArcMap in a standalone Windows application. The problem is the scale is never persisted - the best code I have come up with is the ...
4
votes
2answers
804 views

Identifying features using ArcGIS Engine?

I am new to arcgis. I am building a custom desktop GIS application using arcgis engine 9.3.1 . I want to make a custom identify tool and add it to toolbar control. Any example or code will be ...
4
votes
1answer
2k views

How can I import layer symbology from another layer programmaticaly with ArcObjects & VBA?

I would like to be able to develop a procedure that runs through all layers in the TOC and if the layer (name) exists in a specific folder where I am storing layer files with complex symbology I would ...
4
votes
3answers
5k views

How do I upload a Featureclass to a Geodatabase in C#?

All, I have a featureclass with Arcobjects that came from a Shape file and I wish to import it into a geodatabase. I have the geodatabase connection, I just don't know how to load the feature class ...
4
votes
1answer
99 views

Getting feature at point in C#

I want to get the feature at where mouse was clicked in map. So I was wondering how to get features which intersects with that point. Plus I was wondering how can I check what type of object it is ...
4
votes
3answers
63 views

ArcObjects : How to identify ITool.OnMouseUp method execution

In ArcMap, I have a tool that inherits BaseCommand. The tool enables the user to draw a graphic on the screen. I activated this tool (set as current tool) from a Windows UserForm by getting its ...
4
votes
2answers
144 views

Common variable naming convention in ArcObjects

Not sure if this is really that important, but I'm wondering if there is a list of "common variable names" for different ArcMap objects... for instance, sometimes you see: IMxDocument mxdoc = ...
4
votes
1answer
507 views

How to set focus on ArcMap map window using arcobjects and c#.net

I have developed a custom dockable window with textboxes, comboboxes and a button for use in ArcMap. After the user clicks on the button in the dockable window a function is invoked. After the ...
4
votes
1answer
104 views

How to detect densely labelled areas?

I'm trying to detect densely labelled areas for a given scale like explained below. so dense labelled area is the area having high rate of overlapping labels. I'd like to detect densely labelled ...
4
votes
3answers
759 views

ArcServer 10.1 - Publishing C# Executable as a Geoprocessing Service

I am trying to publish an arcobjects C# executable as a gpservice. We did this in 10.0 by adding it to a toolbox and hitting publish. Using ArcCatalog in 10.1 you must first run the script before you ...
4
votes
3answers
374 views

How to use ITrackCancel to escape IRubberBand track?

I have a BaseTool for AX_MapControl and AX_PageLayoutControl that allows to draw a polyline via IRubberBand. But once the rubberband is started, you can't cancel it e.g. by hitting escape. I found ...
4
votes
1answer
479 views

How to find the service pack level in ArcGIS Addin?

I can query the current version from RuntimeInfo.Version. But I would also like to know what service pack is also installed. Do I need to just check the registery key ...
4
votes
1answer
498 views

Can you edit an SDE table via ArcObjects when not added to ArcMap

I have a table that is in SDE, what I want to do is in my userform click on the "Save" button, and the table will be edited even though it is not within the map document. Is this possible? I have ...
4
votes
2answers
361 views

How to enable MapTips in ArcGIS Engine? (ArcGIS 10)

My organization is working on a new version of our software using ArcGIS Engine. Previous versions of the software (running on ArcGIS Engine 9.3) displayed MapTips fine as long as they were enabled in ...
4
votes
1answer
618 views

Has anyone found a workaround the IMemoryBlobStream.LoadFromFile() error

As far as I am aware, you will get an error if you try to load large file sizes using the function IMemoryBlobStream.LoadFromFile(). Has anyone found some workaround code to load a file into a ...
4
votes
1answer
328 views

Directory.GetFiles vs. ListDatasets - Which is the tool for the job?

I'm currently writing an arcobjects app that performs an arbitrary set of geoprocessing tasks on a group of shapefiles and/or dbf tables. My current implementation uses Directory.GetFiles to build an ...
4
votes
3answers
156 views

How do you navigate the ArcObjects OMDS?

How does everyone get round navigating the different OMD's I can work with single interfaces no problem, but when i have to use multiple interfaces I struggle to get my head round go through different ...
4
votes
3answers
483 views

“ZoomToLayer” not working

I am trying to call ZoomToLayer from my custom code (shown below). ESRI.ArcGIS.esriSystem.UID pUID = new ESRI.ArcGIS.esriSystem.UID(); ICommandItem CmdItem; //pUID.Value = ...
4
votes
1answer
799 views

Checkout Spatial Analyst extention, ArcObjects code

Update After investigating more closely the CODE 2 sample below (at the end of this post), it does check out spatial analyst (sa) extension, however it does not reflect it in the Tools>Extensions ...
4
votes
2answers
5k views

How to implement mouse down event when the user clicks on the map?

Newbie programming in C#.net. I have a very simple desktop application in in arcmap. I'm trying to get the coordinates when a user clicks a button on a toolbar and when click the map. The toolbar is ...