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
5
votes
3answers
2k views

finding nearest point to a point

I work in GIS with VBA. I have 2 Points layer.One of them is City points and another is hydro station points.I want write code in vba for selecting one point from station layer and finding closest ...
2
votes
3answers
2k views

How to programmatically get a reference to an ICommand inside ArcGIS?

I'm having problems trying to get a ICommand using the method ICommandBars.Find. The ICommand is there, but it's returning null to me. Any ideas? public static ICommandItem GetCommandItemByName(...
3
votes
1answer
2k views

Data dialog to select Geodatabase

I need to create a dialog that the user can select a proper Workspace. Is there a similar to IAddDataDialog, but for workspaces?
3
votes
1answer
517 views

Runaway memory usage with Event Layers in ArcGIS Engine and Desktop?

I have an ArcEngine application, based off an MXD with an axMapControl. Several of the layers in the map are event layers built with XY data in a SQL table. It has routing info applied from a ...
0
votes
3answers
2k views

How do i popup a context menu with custom command items in a Select tool OnMouseDown (Right Click) with VB .Net?

This should be simple... I am converting VBA customization to VB .NET in VS 2008 Express Edition. In VBA i have a custom selection tool. Aside from just selecting features, when OnMouseDown receives ...
3
votes
4answers
1k views

Drawing selection custom selection box using ArcObjects?

I have some code that I'm using to selecting features in a certain extent. I already rigged the tool properly, so it selected the objects as needed, but I want to draw interactively the selection box ...
2
votes
2answers
305 views

.NET Components triggering ITools on ArcEngine/Objects

I'm building a simple map interface on a .net component that I need to redistribute around. Well, my initial thoughts was to create the tools just the way I'm used to do it in ArcMap, inheriting ...
3
votes
4answers
1k views

Debugging DLL (ArcGIS tool) with Visual Studio 2008 Express?

As per Esri's recommendation I began the process of converting my existing VBA customization into VB .Net Express edition. I was surprised to realize that debugging a DLL is not an option in the ...
10
votes
2answers
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 ...
10
votes
3answers
8k 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, ...
5
votes
3answers
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 ...
0
votes
2answers
684 views

Bug in ControlMapMeasureTool? “Measure An Area” creates a duplicate dialog in ArcGIS Engine 10

When we add a measure tool to the AxToolbarControl through the properties dialog, we can change to measure length and area in the dialog that pops up. But when we add a ControlsMapMeasureTool through ...
4
votes
3answers
3k views

Showing progress in ArcGIS Engine application!

I would like to add a progress indicator to our ArcGIS Engine 10 application. Like a progressbar in the statusbar to show when the MapControl is busy getting or drawing the map. I've been trying to ...
0
votes
1answer
136 views

Change order of added FeatureGraphicsLayer in GraphicsDataSet?

I am adding two FeatureGraphicsLayer to a GraphicDataSet like so: graphicsFunctionality.GraphicsDataSet.Tables.Add(featGraphicsLayer); It looks like it puts the last one in on the very top of all ...
3
votes
4answers
3k views

IFeatureCursor.NextFeature not releasing memory

I've got a non recycling cursor retrieving features into a List<IFeature>. When I populate the list, I can see my memory usage climbing up. When I discard my list (or it goes out of scope), ...
5
votes
1answer
257 views

When a class in an ArcGIS extension should be an ArcGIS class

Visual Studio templates provided by the ArcGIS SDK offer a "ArcGIS Class" which is a simple C# class that has the attributes Guid, ClassInterface, and ProgId before the class declaration. While adding ...
3
votes
0answers
322 views

How do I Convert from LayerDescription.SelectionFeatures to GraphicsLayer?

How do I convert (in a clear and concise way) from ESRI.ArcGIS.ADF.ArcGISServer.LayerDescription.SelectionFeatures to ESRI.ArcGIS.ADF.Web.Display.Graphics.GraphicsLayer I want the selected ...
13
votes
1answer
1k views

Bug in F******** spatial relation? (I'm not cussing)

I would expect ISpatialFilter.SpatialRelDescription to behave consistently with IRelationalOperator.Relation. However, when I run the code below, I get: Total features : 44368 Count1: 9 T****...
1
vote
1answer
391 views

Requirements for BaseCustomLayer in ArcScene?

What must be implemented/included to add a layer deriving from BaseCustomLayer to ArcScene? I have had success adding a BaseCustomLayer to ArcMap by implementing Draw, AreaOfInterest, Cached, ...
9
votes
7answers
5k views

Is there an existing library for converting ArcGIS Features to Json?

Is there an existing library for converting ArcGIS IFeature types to and from Json/GeoJson?
4
votes
2answers
3k views

Merging two polylines with programming?

We are currently working on a project where we have to merge sections (polylines) to a route, but the big question is how to do this. We have currently tried adding those two as segmentcollections but ...
4
votes
0answers
490 views

Bad data beaking IRelationshipclass.GetObjectsRelatedToObjectSet

I have two workspaces - one a File GDB, the other SDE (SQL Server). Both workspaces contain the same data with the same relationship classes. When identifying features in ArcCatalog, the results ...
5
votes
3answers
8k views

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

I have a featureclass with Arcobjects that came from a Shapefile 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 to a ...
10
votes
1answer
1k views

Implement ArcGIS Custom Features with C#?

Is it possible to implement custom features in .NET? If so, how? I suspect the issue is being able to do COM aggregation with .NET, but I can't find anything on that ... Does anyone know if it is ...
4
votes
2answers
286 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 ...
1
vote
1answer
248 views

How to get pre-change Object state from a Class Extension change event in ArcObjects?

I have an Esri based system with a class extension registered for the feature classes. This extension implements IObjectClassEvents, and handles OnChange. I get passed the modified object, but after ...
2
votes
2answers
745 views

Using IWorkspace.Exists() method?

I have a valid and existent workspace (file geodatabase) in a specific folder. [TestMethod] public void WorkspaceHandler_TestConstructor_FileGdbWorkspace() { workHandler = new ...
1
vote
1answer
260 views

Using IFieldChecker in ArcObjects?

I'm having some problems using IfieldChecker. I have this following code, which I'm trying to test permitted/not permitted fields, according to my workspace public IEnumerable<IFieldError> ...
2
votes
2answers
599 views

ArcObjects table views or SQLite3 in Python?

Given a larger csv (1000+ points) with attributes, I need to do both attribute and spatial queries on the data. Would it be faster to read the points into an xy feature class, and do the spatial and ...
2
votes
1answer
343 views

Disadvantages to ESRI Plug-In Data Sources

I wanted to know what disadvantages ESRI plug-in data sources have when compared to custom layers. I am looking to implement a fairly large (in terms of average dataset size) read-only custom type ...
0
votes
0answers
492 views

IronPython + ArcObjects

Is it possible to access ArcObjects with IronPython?
130
votes
5answers
24k 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?
2
votes
1answer
857 views

Setting toolbar server control currenttool to none with ArcObjects and ArcGIS Server?

I am only using the map control and two toolbars on a custom webadf application. One toolbar contains the standard map navigation controls. The other toolbar is only one toolitem which references a ...
10
votes
2answers
1k views

What are the implications of using .NET Generics to store ArcObjects?

I'm wondering what are the implications of using Generic types in .NET to store ArcObjects, such as ILayer, IField, etc. The compiler throws me a warning when using these kind of values public class ...
3
votes
1answer
604 views

ITopologicalOperator and Z Values

I have 2 polygon featureclasses with Polygon ZM features. I am trying to do a ITopologicalOperator.Difference() on these feature classes but it errors saying that: Geometry cannot have Z values ...
4
votes
2answers
2k views

Unable to cast COM object (IMapServer --> IMapServerObjects)

I have just deployed an AGS-based application to our web server. This app worked great in development, but after deployment to the server I got the following error: Unable to cast COM object of type '...
6
votes
2answers
1k 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 ...