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
1answer
332 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
95 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
4answers
384 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
688 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
636 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
2answers
890 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
420 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
651 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
1answer
360 views

With ArcObjects, distinguish between Save Edits with and without closing the current edit session

Is it possible with ArcObjects to distinguish between the user selecting the Save Edits button and the users selecting the Stop Editing button and then saving edits? The reason for this is that in ...
4
votes
1answer
441 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
799 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
117 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
306 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
3answers
661 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 ...
4
votes
1answer
93 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
1answer
252 views

Turn off field programmatically in ArcMap via VB.Net

I'm creating an addin button in Arcmap via VB.net that when clicked, runs the identify tool. But I want only selected fields to appear in the identify dialog. My idea is to hide the unnecessary fields ...
4
votes
1answer
644 views

How to split a Polyline Geometry at a certain point in ArcObjects?

I have a polyline geometry and wish to split it into two different geometries, based on a given point on that line, in ArcObjects. I have tried to find out how to do this, but to no avail. I found ...
4
votes
3answers
639 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
312 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
359 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
446 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
334 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
497 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
284 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
141 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
439 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
2answers
4k 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 ...
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
1answer
710 views

How to catch when layers visibility change in ArcGIS?

I'm trying to regenerate a Legend in a Pagelayout whenever the layers visibility are changed in the TocControl. What is the best way to catch when a layer visibility is changed?
4
votes
2answers
232 views

Is the order in which ArcMap loads Extensions, Toolbars and Commands defined?

When you extend Esri's ArcMap with both an Extension, a Toolbar and a number of Commands, is the order in which these categories are loaded by ArcMap well-defined? (I.e. are Commands always loaded ...
4
votes
1answer
87 views

Cannot use a SnapAgent alone?

I'm trying to use a standalone snap agent. Is that not possible? Here's some code: // instantiate these agents. _snapSupportAgent = new FeatureSnapClass(); ...
4
votes
2answers
107 views

How to do raster conditional comparisons in .NET?

I am comparing a raster with a constant value by raster calculator. Now I want to do this in a c# code. Question Is there any process to do this kind of raster conditional comparison in .net?
4
votes
2answers
1k views

How to update geometry in ArcObjects?

I'm just starting with ArcObjects and I want to update coordinates of geometry vertices. Specifically, I want to swap X, Y coordinates for each vertex of polygons (which can be multipart and have ...
4
votes
1answer
227 views

Retrieve data from FeatureClass

I have : FeatureClass (Structure) column (Type) column (OID) I am trying to get the (Type) for specific OID. I tried to use this code but it dose not work. IFeatureWorkspace featureWorkspace = ...
4
votes
1answer
276 views

List all active extensions with ArcObjects

I am building an ArcGIS 10 Addin that dumps out as much debug information about a system that I can get. I am currently trying to query which extensions are active in the ArcMap session. The following ...
4
votes
1answer
1k views

Cant edit this featureclass. Why?

I can successfully create this featureclass in the ArcGIS10 default geodatabase and add it to the project, but it can't be edited. I have tried to add a feature using ...
4
votes
1answer
294 views

ArcObjects: How to get the midpoint of a set of polylines?

How can I find the midpoint (along the curve) of a set of polylines using ArcObjects?
4
votes
1answer
460 views

How to use ICalculator with a pre-expression in C#

Another wonderful predicament. I am trying to use an instance of ICalculator to update a field based on another field. Textbook stuff. Unfortunately, the example in the SDK for C# is a bit lacking. ...
4
votes
2answers
367 views

How to retrieve the per-feature value rendered when IGeoFeatureLayer.DisplayAnnotation is true (ArcObjects with C#)?

In another area of my application I'd like to display the per-feature label value rendered when Labeling is turned on in ArcMap, i.e. when IGeoFeatureLayer.DisplayAnnotation becomes true. I have a ...
4
votes
1answer
582 views

Visual Basic editor command icon is always disabled

I recently installed ArcGIS 9.3 in a PC with Windows 7.0. I opened an existing mxd file within which I developed some toolbars for a project. Each icon of a toolbar has behind it a VBA and ArcObjects ...
4
votes
1answer
506 views

Obtaining a contour as a single polygon in ArcGIS?

I have a DEM that I want to retrieve a single contour polygon from at a given elevation. I can use the Contour tool to obtain a series of polylines at a given elevation by setting the contour interval ...
4
votes
1answer
202 views

Create a esri layer file through web map

Is there some way to create a layer file through web mapping application. If I expose data through a map service is there a way to create a .lyr file?
4
votes
1answer
507 views

Is it possible to reverse the trend/values of a raster?

For example - if I have a raster DEM covering a stream with higher elevations in the west (up river) and lower elevations in the east (down river) is it possible to reverse this trend so that the east ...
4
votes
1answer
223 views

Access is Denied error on ProjectEx call

I need to be able to convert a lat/long coordinate into a point coordinate and am having trouble getting my code to work. I created a test app isloating the code that is giving me problems. I'm ...
4
votes
1answer
162 views

Which interfaces/classes do I use to access the highlighted rows in an ArcMap attribute table?

I've tried to use various interfaces to access SelectionSet of table windows/tables but all I get back is the selected records (cyan). I want the highlighted rows/features (yellow). I would like to ...
4
votes
2answers
891 views

Publish MXD to server in ArcObjects C#

I have an MXD that I would like to publish to an ArcGIS server using C# ArcObjects (preferably as an MSD). I have been unable to find anything regarding this. Essentially I would like to implement 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. ...