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
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 ...
2
votes
1answer
505 views

ArcGIS: How to programmatically refresh selected features

Background: I have C#, ArcGIS command that 1. lists selected features, and 2. allows you to delete selected features from this list out of a geodatabase. My problem: After I delete features, ArcGIS ...
1
vote
1answer
398 views

Obtaining friendly names for ArcMap layer data types

Using ArcObjects, is there a way to programmatically obtain the "friendly name" for a layer's data type as seen in the ArcMap Source tab for layers in a map document? e.g.: File System Raster ...
1
vote
0answers
87 views

Connect to Esri map service using c++ in stand alone desktop app

Can anyone tell me how to do this? Here is my code. The Open call returns E_INVALIDARG. IAGSServerConnectionFactoryPtr AGSConnectionFactory; ...
5
votes
1answer
2k views

How to make a WPF Window be a well-behaved child window of ArcMap?

I am pretty familiar with Windows Forms in ArcGIS but WPF, which I'm just starting to tinker with, seems to be a different animal. I've created an ArcMap add-in with a button that displays a Window ...
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 ...
3
votes
0answers
177 views

ArcGIS and SqlServer.Types: Does feature.Shape.SpatialReference.FactoryCode == srid?

I created a test implementation of the ESRI Geometry to WKT recipe provided by @SagebrushGIS. It seems to work great, but I'm wondering if the SRID value expected by Microsoft.SqlServer.Types ...
4
votes
0answers
478 views

ArcGIS Cost Path Analysis - How Is Arcpy Cost Path Analysis Tool So Much Faster Than ArcObjects

Although I love slinging some python to create geoprocessing scripts/services, I was under the impression that using ArcObjects to do the equivalent operation(s) will have better performance. I've ...
1
vote
0answers
318 views

C# ArcObjects RubberBand Tracking Cancel

I've written a function to create a polygon based on geometry collected from the IRubberBand interface as follows: ITrackCancel esc = new CancelTrackerClass(); esc.CancelOnKeyPress = true; ...
3
votes
2answers
606 views

How do I obtain the envelope of a data frame in Layout?

This is to expand on this question. How can i programatically obtain the corner coordinates (in page units) or the envelope of the data frame in layout view? I don't seem to be able to do this with ...
1
vote
1answer
269 views

How can I transform layout page units to map units?

I am trying to build an add-in that will create a polygon from the current map extent. This is not a problem in Data View where I can easily get the envelope of an iMxDocument:iActiveView in data ...
1
vote
1answer
202 views

How do i get ArcObjects not to ignore a layer definition that has been set?

I am creating a simple text search application, where the user can enter an address search and the result appear in a listbox, which they can then select it and zoom to the address. Now the problem I ...
1
vote
1answer
783 views

How do I delete specific graphics on the map using arcobjects

I am writing a small application that allows the user to click on the map, and it will create 3 buffers (these are graphics using the IElement interface) at specified distances. What I want to do is ...
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 ...
3
votes
2answers
674 views

Is it possible to deploy on a ArcGIS 9.3.1 machine a component created with ArcGIS 10?

We are developping a C# ArcObjects Class extension assembly. Our development machine was recently updgraded to ArcGIS 10, but when we try to install the assembly on a 9.3.1 machine, we get an R0000 ...
2
votes
2answers
2k views

Geoprocessor Select By Location Using Features Instead of Layers

I have a simple spatial feature selection function that includes: public static void SelectByLocation(IFeatureClass sourceFC, ILayer selectLayer) { Geoprocessor GP = new ...
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 ...
1
vote
0answers
73 views

How to protect my application ESRI FGDB data from authorized access using other applications?

I have ArcObjects app which uses file geodatabase for storing data and performing CRUD operations. This file geodatabase needs to be protected from reading data in other applications such as ArcMap, ...
3
votes
2answers
331 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, ...
4
votes
3answers
760 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
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 ...
6
votes
3answers
4k views

ArcObjects/ArcServer 10.1 - How to programatically publish a map service?

I am migrating some ArcObjects C# code to 10.1 and am having some trouble programatically publishing an MSD. We are using a multi-site configuration (not sure if that matters). Here is the code I am ...
4
votes
1answer
329 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 = ...
1
vote
0answers
41 views

Programmatically determine if a local geodatabase is File or Personal [duplicate]

Possible Duplicate: How to distinguish between File and Personal Geodb workspace? How can you determine whether a workspace is a file or personal geodatabase? Using IWorkspace::Type you ...
6
votes
2answers
136 views

What event is fired when a feature is edited?

When the user draws a new feature (line, point, etc.) in ArcMap, there are null attributes. If the user enters values in these null fields what is the event that is fired? I want to control the ...
2
votes
1answer
179 views

Ghosting and Map Functionality Loss in Map View C# Arcobjects

I'm writing a C# add-in and trying to implement a piece where a user can add points to a graphics layer on the map view. The points are drawing, however the map pane has serious ghosting issues and I ...
3
votes
2answers
317 views

ArcMap: Not scaling and/or rotating when exporting a map

I am writing a console application using ArcGIS (engine or desktop). I'm trying to rotate and scale a map based on a polygon, and I'm not having any luck at all. With some tinkering, I can usually do ...
2
votes
3answers
640 views

Connecting to non geodatabase MS Access database using ArcObjects

I am trying to connect to an MS Access database from a program I have written in VB.Net with ArcObjects 10.0. My MS Access database is not a personal geodatabase so apparently I have to connect to ...
4
votes
4answers
494 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 ...
1
vote
0answers
329 views

Length in meters arcobjects [duplicate]

i have a an array of polylines in epsg:3857 projection, and i want to calculate length of each polyline. i am new to arcgis and arcobjects, i couldn't find the functions that i need. Should i use ...
2
votes
1answer
292 views

How to change the raster NoData value with ArcObjects?

I am trying to change the a raster's NoData value with ArcObjects and keep coming up short. Here is the code that I thought would work: IRasterDataset _dataset = ...get the dataset... object[] ...
2
votes
1answer
345 views

Arcgis IPolygon(System.__comObject) and ILine2 (Esri.Arcgis.LineClass) intersection

Currently i am developing a Server Object Extension. On my project i am creating a new line class with LineClass myLine = new LineClass(); and getting a polygon from client as JsonObject than ...
2
votes
1answer
559 views

get style item name of one marker symbol

i used next code to load a symbol with specific style.. now i need to do the opposite operation.. i mean, i have one symbol and i want to know it's style. is it possible? private ISymbol ...
2
votes
1answer
124 views

How to use IObjectClassEvents?

I need to use IObjectClassEvents in my project. I don't know how to start, can any one give me a simple explanation, or an example in C#.
2
votes
0answers
133 views

How to change tooltip of an esriControl?

Is there a way to change an esriControl's tooltip? I tried using the ICommand interface but the tooltip propertry is read-only. If I have to build a whole new ICommand and/or ITool is there anyway ...
2
votes
1answer
319 views

Query against FeatureClass for a layer

This is some code that I am using to try to get a working IFeatureLayer from a subset of data from a database table. The fourth line containing "fcWkspc.OpenFeatureQuery" throws and error complaining ...
13
votes
1answer
1k views

How to get selected Features/Geometry from Windows Clipboard in ArcMap/C#?

I have a custom tool in ArcMap 10. The Workflow is the following: Select Features in a Layer with the "Select Features by Rectangle" tool Copy the Features to the Clipboard using STRG+c Select the ...
2
votes
1answer
124 views

How to cancel the edit session?

I want to prevent the user from starting an edit session under certain conditions. How can I do that? void m_editEvents_OnStartEditing() { // Code }
3
votes
0answers
130 views

GeoJSON support in ArcObjects 10 .NET

i am currently trying to build a geoprocessing application using OpenLayers and ArcObjects, I have some features that user draws on openlayers and i need to send these features to arcobjects for ...
1
vote
1answer
116 views

Listen to edit events

I recently started working on ArcMap. I want to make some changes to the edit tools. For example I want to prevent the user from using the sketch tool when the time is between 1pm and 2pm But I ...
1
vote
0answers
29 views

Editing MosaicDataset attributes

Good morning!, I'm trying to access and edit an MosaicDataset (I need to edit the MaxPS/MinPS fields) But I can't find a way to access them programmatically.. Doe's anyone know how can I edit these ...
1
vote
0answers
21 views

Rasterband Casting Probem [closed]

We have a program that was previously using ArcGIS 9.3 and we recently updated it to ArcGIS 10.0. The program was working before with a line of code that cast an object as a RasterBand. Now we are ...
3
votes
1answer
339 views

Draw graphic on screen without requiring a double click to finish sketch

I am trying to get the user to draw a line(only 2 vertices) on the screen(just like the georeferencing link/spatial adjustment link). I got the below snippet from ESRI website which does give me a ...
3
votes
2answers
455 views

Get the geometry from the lasso selection tool

I'm building an Add-in solution in ArcGIS 10 that contains a custom tool. I'd like to borrow the functionality of the lasso selection tool without reinventing the wheel. Is there a way to intercept ...
1
vote
1answer
2k views

Writing In-memory IFeatureLayer to Shapefile using ArcObjects (Engine SDK)

I've been working on this for a little while now, and can not seem to get this thing working. I've managed to export a geodatabase feature class and shapefile to a shapefile, but what I'm struggling ...
3
votes
0answers
197 views

How to read pixel values from an image server layer with ArcObjects?

I'm having a problem with reading pixel values from the image server layer. The image server layer class implements IRasterLayer, so when I tried to read pixel values using IRaster2 obtained through ...
2
votes
1answer
535 views

Snap Polygon vertices to Point features

I have a set of polygons drawn using an inaccurate GPS PDA. these polygons are sharing nodes. after post-processing GPS data to get accurate coordinates i have a set of all the nodes, then i have to ...
1
vote
1answer
77 views

generating some random points along network

I'm having trouble with generating some random points along a network. I am trying to do it with Arcobjects in the VBA environment. I would be grateful if you could help me.
-1
votes
1answer
559 views

Reconcile and post versions through C#?

I want to know if we can post the versions based on events through coding. How we do batch reconcile and post through c# code? Is it possible for automatic replication also?
3
votes
1answer
251 views

Repairing disconnected layers with selection sets

Has anyone had any success of repairing disconnected layers that have selection sets that have their data sources broken in ArcGIS? Is there a way to detect this through code and then re-create that ...