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)

2
votes
2answers
106 views

How to get Database name for layer in ArcObjects?

I am writing an ArcGIS ArcMap Add-In and need to determine what database a given layer from. How can I determine this information? I attempted to use the FeatureLayer to get a FeatureClass, and then ...
3
votes
1answer
821 views

How to edit a given version of geodatabase?

I have a versioned geodatabase. Any of that versions are used only by one user. So then user called "XXX" has a version called "XXX". So then now I want to make a changes on given version, but when I ...
4
votes
2answers
99 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], ...
1
vote
0answers
108 views

ArcObjects - Export map to PDF - graphics not appearing

I'm having an issue with our ArcObjects code for exporting a map to PDF. There is a section of code that adds graphics on to the map (polygons, lines, text etc). This seems to work fine for the first ...
16
votes
9answers
3k 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, ...
3
votes
1answer
217 views

In ArcObjects, how do I change the spatial reference of a Map (Data Frame) in an existing MXD?

I need to change the spatial reference of an existing MXD programmatically. In ArcMap UI, I would take the following steps: 1) Open the data frame properties and go to the Coordinate System tab; 2) ...
3
votes
1answer
529 views

How to declare ArcSDE workspace for Geoprocessing tool in ArcGIS 10.1 using ArcObjects and c#?

What is the proper way to declare an ArcSDE workspace for Geoprocessing tools in c# .net? I am using ArcGIS 10.1 SDE (MS SQL) on SQL Server 2008. I want to write code so that every night the server ...
3
votes
3answers
227 views

Get IWorkSpace from IGxObject

I am creating a tool that opens an IGxDialog which it's objects are filtered to show only workspaces, my question is how can I convert IGxObject to IWorkSpace or get the selected workspace without ...
5
votes
2answers
657 views

ArcObjects - find nearest feature to a point - has to be FAST

I've seen lots of discussion on this, especially using IIndexQuery.NearestFeature() on a FeatureIndex instance. Something like this: private IdDistancePair FindNearest(IGeometry g, IFeatureClass fc, ...
0
votes
0answers
48 views

Command doesn't show up on ICommandBar

I'm trying to put a custom command into the Help menu on startup if it isn't already there. This is my code to do so: private void OnCreate() { // other stuff in OnCreate()... // registering ...
0
votes
1answer
40 views

Handle string or int in server object extension

How would you also check to see if the value you are passing into into an SOE is an integer as well? This checks for string, but returns 0 when passing number: string searchValStr; int ...
1
vote
0answers
36 views

Icon missing when adding custom combobox command to Toolbar

I have a custom command: class ATL_NO_VTABLE CSliceSelector : public CComObjectRootEx<CComSingleThreadModel>, public CComCoClass<CSliceSelector, &CLSID_SliceSelector>, ...
0
votes
1answer
388 views

Spatial index grid size is invalid

I am trying to move a point feature programatically, but on stop operation, I am getting this error : spatial index grid size is invalid Kindly help. Regards
3
votes
2answers
970 views

Why does IActiveView.PartialRefresh not work?

I have a problem with the method IActiveView.PartialRefresh which is not working as it should be (or I'm using it not correctly). I'm writing an ArcGIS 10 Add-In using C# and want to clear a ...
0
votes
2answers
839 views

how to create table and layer in c#

I have used Make XY Event Layer to Creates a new point feature layer based on x- and y-coordinates using python and it worked for me. Now as a need of my project i want to apply the same in c# using ...
1
vote
1answer
129 views

Why does Exporting Document to JPEG using ArcObjects in Layout View result in bad picture quality?

I want to export the Active View with ArcObjects to JPEG. All Layers in the Document are raster layers (GeoTiff). I use this code which works quite well when in Data View, but when I perform the same ...
1
vote
0answers
24 views

Implementing day night functionality [duplicate]

I want to implement day/night functionality on world map i.e there will be dark layer showing countires having night now. This world map could be creaeted through ESRI or SVG map.I want to ...
1
vote
1answer
64 views

Errors when creating a TextElement from ArcObjects

I am attempting to add some text in the layout view of ArcMap. I’m using the following line for the TextElement that I’ve found online from numerous places including ArcObjects Library Reference. ...
1
vote
0answers
53 views

GP-Tool: Detect if running in background or foreground ? (ArcObjects)

I got a geoprocessing tool which I want to prevent from running in background, due to some weird crashes that happens. Is it possible to programmatically detect if background processing is enabled ? ...
0
votes
1answer
36 views

How do I draw an EllipticArc (or any other Segment) in a Dynamic Layer?

I am trying to draw an EllipticArc (or any other Segment for that matter) in my Dynamic Layer using the ArcObjects C++ API. For something that seems like it should be straightforward, I am having a ...
1
vote
1answer
63 views

How to convert an IGeometryCollection into a Polyline

I am using the CostPathAsPolyline method which returns the Polyline as an IGeometryCollection. I now need to get this converted back into a polyline. But it seems to be more complex than just a ...
2
votes
2answers
279 views

How to draw one rectangle in ArcObjects?

Is there button in ArcObjects "draw rectangle" such as in openlayers? Update Well, I use this code for drawing: ESRI.ArcGIS.Display.IScreenDisplay screenDisplay = Map1.ActiveView.ScreenDisplay; ...
3
votes
0answers
129 views

converting a distance to a map distance

I have a point and a polyline. I need to find the perpendicular distance between each segment of the polyline and the point. By each segemnt of the polyline I mean that, each polyline may contain more ...
1
vote
0answers
31 views

Is it possible to add dynamic controls to a dockable window?

I am writing a small application that uses the dockable window. What will happen is that for each layer in the TOC a label and checkboxes will appear within the dockable window. However what do i need ...
3
votes
1answer
162 views

How do I draw transparent polygons with ArcObjects?

How do I draw transparent polygons in ArcObjects? I mean is it possible to set alpha channel?
1
vote
1answer
148 views

Getting Coordinates from a feature with VBA

Is there a way to get the longitude and latitude coordinates from a feature class? I have some code which can select the first layer in the Table of Contents. I want to be able to get the lat./long. ...
2
votes
1answer
78 views

Replicate Import Symbology Matching Dialog in ArcObjects?

In Arcmap I can render a layer with same symbolgy applied to different fields by way of re-importing the .lyr file and choosing a Value Field. How can I replicate this functionality in ArcObjects?
1
vote
0answers
31 views

IfeatureClass.searc(Iqueryfilter pqueryfilter, bool recy) is throwing external component has thrown exception [closed]

I am running my code to trace features approx 20 lacs and my code is working fine for 2 or 3 lacs features and after sometime it thrown external component exception. Please provide any code ...
0
votes
0answers
28 views

Manipulating Rasters and Cost Arrays

I have a map file created by an external group. Within this file is the hydrography map. In one existing piece of code we are making a call ... passing a CostArray as follows, the FeatureClass being ...
1
vote
0answers
39 views

Issues using Arc 10.0 extension recompiled for 10.1

I have a written an ArcGIS extension in C# .Net for version 10.0. I have attempted to recompile this extension for 10.1 and that works. But running the extension in 10.1 is causing ArcGIS to crash. ...
12
votes
1answer
382 views

Hyperlink tool use in ArcEngine

I'm having some difficulties using the hyperlink tool (ControlsMapHyperlinkTool) in ArcEngine. Does anyone have any experience with it? It looks like it behaves correctly except that every time a ...
0
votes
0answers
125 views

How to get the top left and lower right coordinates of polygon in ArcObjects?

First of all, draw the rectangle ESRI.ArcGIS.Display.IScreenDisplay screenDisplay = Map1.ActiveView.ScreenDisplay; screenDisplay.StartDrawing(screenDisplay.hDC, (System.Int16) ...
1
vote
0answers
45 views

How to return shapes from geo service?

I have a geo service that seems to finally be working. I have the service setup with a list of Polylines as the returned object. This is what I'm trying to implement but it doesn't work: ...
6
votes
3answers
553 views

How to convert high precision dataset to low precision

A high precision dataset was loaded from a file geodatabase into arcsde 9.3.1. The dataload was achieved by copy/paste in ArcCatalog. A custom tool (arcobjects) that extracts from the dataset to a ...
1
vote
1answer
134 views

How to use the IRelationalOperator interface to check if a point feature within a polygon feature?

I use the following code to check if a point feature is within a polygon feature pFeaBlock is a polygon feature and Fea is a point feature int blockID = -1; IFeatureCursor pBlockCursor = ...
1
vote
1answer
60 views

CreateRasterCatalog on the fly using ArcObject 10 .NET SDK

My debugger crashes without showing any error. It crashes not even catches exception on the line: rasterWorkspace.CreateRasterCatalog(catalogName, fields, "Shape", "Raster", "defaults"); Code ...
1
vote
1answer
113 views

Why does my ITopologicalOperator Intersect result have incorrect area?

I have used ITopologicalOperator for getting common Area of two polygons but the result is not correct. May anyone please tell me how to get the common area of two features. //Make Topological ...
5
votes
2answers
559 views

What are pros and cons of Python add-ins vs .NET add-ins to ArcGIS for Desktop?

I found in ESRI .NET help: Python All ArcGIS Desktop applications include an embedded scripting language called Python. Many areas of ArcGIS—particularly geoprocessing—are accessible through ...
1
vote
1answer
225 views

How to create windows form based tools as add-ins in arcgis 10.0 using vb2010

Here i am again with a query again. Let me explain the project layout first. I am writing a project in vb2010 in which i want to add a package having 4 toolbars with about 48 tools in them in ArcMap ...
0
votes
1answer
43 views

How to access functions from another project in vb2010

I have written a project which has common functions in Visual Basic 2010 i.e. Visual Studio 2010. for e.g. Public Function FlashPolygon(pDisplay As IScreenDisplay, pGeometry As IGeometry) Dim ...
1
vote
0answers
121 views

How Display WMS layer in AxMapControl?

I modify application (on c# .Net) based on arcobjects. It is a desktop application. I use object AxMapControl Map1. I can load .mxd map in it. Map1.LoadMxFile(mapName); Map1.Refresh(); Now I need ...
1
vote
0answers
29 views

Bug in ArcGIS WebADF's IMapFunctionality.DrawExtent?

I'm maintaining an old ArcGIS WebADF-based application that has recently been upgraded to use the 10.1 libraries. I'm not too optimistic about finding a solution as I think I'm the only person in the ...
4
votes
0answers
549 views

How to find layer ID and name from Identify query using ArcGIS Web ADF?

I need to retrieve the layer ID of every layer returned by the IQueryFunctionality.Identify function (I am using ADF with .NET) Identify function spits out a DataTable array for layers which have ...
1
vote
0answers
231 views

Add print/export button to axToolbarControl [closed]

I have a map that's being rendered inside a custom application, and now I need to add to the ESRI.ArcGIS.AxToolbarControl an export (to PNG) button and a print button, but honestly don't know how. ...
1
vote
0answers
340 views

Intersecting with Geodatabase.ISpatialFilter - no results

I'm trying to intersect two layers and get resulting features with the following code I've written: ESRI.ArcGIS.Geodatabase.ISpatialFilter spatialFilter = new ...
0
votes
0answers
55 views

How to remove Raster from Raster Dataset programmatically?

I have Raster (it is 6 adf files). This raster was added to Raster Dataset in sde database. Geoprocessor geoProcessor = new Geoprocessor(); Mosaic mosaic = new Mosaic(); ...
3
votes
1answer
666 views

How can I access standard ArcMap cursors?

I'm writing an Add-In for ArcGIS 10 and would like to use the standard mouse cursors ArcMap uses (e.g. the info cursor and the edit cursor). I hope it is possible to just use the right reference in ...
1
vote
0answers
151 views

Trouble programmatically publishing to SOM when SOC is on another machine [closed]

I wrote a desktop extension for ArcMap that allows a user to publish the map they've just created to an AGS 9.3.1 machine on another server. This works fine as long as the AGS machine acts as a SOM ...
2
votes
0answers
229 views

how to buffer a raster cell using Visual Basic ArcObjects in ArcMap [closed]

I am new in visual basic, I have a question about creating a buffer zone based on a raster layer. I have a raster layer named "Value_Raster", I have a textbox in the userform, I also create a tool ...
1
vote
0answers
105 views

Cutting Polyline at the beginning and end by some unit [closed]

The problem is: I have got a IGeometry (polyline dimension) - let call it A. Given a ray and a center point (disk B, polygon dimension ) I would like to result in a IGeometry that does not have the ...