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
3
votes
1answer
1k views

IElement added to IGraphicsContainer ignores zOrder

I display a balloon callout after casting a axMapControl.Map to a IActiveView and doing this: pGraphicsContainer = activeView as IGraphicsContainer; pGraphicsContainer.AddElement(pElement, zOrder); ...
6
votes
2answers
1k views

How to convert GML to features in ArcObjects?

How to convert GML to features and features to GML i ArcObjects? We are building an application where we want to communicate with a service with GML but natively in our stand-alone application we ...
1
vote
1answer
975 views

How to create a pop-up box if a condition is true in a table? (ArcMap 10)

I'm creating a script that will grab layout data from a table for the current Building Number of the current building my map series is on. It works fine, but I need it to pop up a window if multiple ...
1
vote
1answer
181 views

Find out if a point exists in an irregular shaped ILayer

Assuming I have an layer from a shapefile which is not shaped like a rectangle how would I determine if a point lies within this layer?
1
vote
4answers
873 views

How to hide map to print only the legend on a PageLayout?

If I'm printing a Pagelayout, is there any API for hiding the MapFrame or stop it from getting draw on the printout? I would like to only print the Legend on the paper.
2
votes
1answer
2k views

What are the main steps when building a balloon callout using ArcObjects in arcengine 10 in VS2010 with C#

I'm looking for a good BalloonCallout example / tutorial / sample. edit: Using C# with ArcEngine 10 edit #2: What are the main steps when building a balloon callout using ArcObjects in arcengine ...
0
votes
2answers
328 views

Ensure BaseDynamicLayer is always the most visible layer

If I add a shapefile to my map and then a dynamic custom layer inherited from a BaseDynamicLayer, then the shapefile is lower on the viewing stack then my custom layer, and it displays correctly. ...
6
votes
2answers
2k views

Does anyone know a function to determine if a Point exists within a polygon?

Does anyone know a function to determine if a Point exists within a polygon? Edit: I'm using C# with ArcEngine10.
0
votes
3answers
208 views

Anyone have any ideas why this tiny code snippet throws a COM exception?

System.Object obj = Activator.CreateInstance(Type.GetTypeFromProgID("esriLocation.LocatorManager")); ILocatorManager2 locatorManager2 = obj as ILocatorManager2; ILocatorWorkspace locatorWorkspace = ...
3
votes
3answers
1k views

How to create a Personal Geodatabase

How can I create an Access (.mdb) file containing a personal geodatabase?
1
vote
1answer
661 views

Getting feature class from Map using ArcObjects?

I have an axMapControl.Map, I am trying to get a featureClass. I want to use this feature class to call create a GeoProcessor IGeoProcessorResult result = GP.Execute(someFeatureClass, null) as ...
5
votes
2answers
2k views

How to filter Legend to show only visible features?

Is it possible to get the legend in a pagelayout to only show patches/swatches for features fall within the visible extent of the Map? The solution needs to work on FeatureLayers and ArcGIS Server ...
0
votes
2answers
455 views

GDB file and USA Base Map.mxd not in the same directory ArcObjects

I am trying to open a address locator in ArcObjects by following this tutorial: http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Creating_an_address_locator/...
1
vote
2answers
2k views

Where can I get UnitedStates.gdb file

I am doing this tutorial http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/How_to_geocode_a_single_address/00010000038r000000/ but it requires the following file: ...
3
votes
0answers
3k views

How to set margin on PageLayout in ArcGIS Engine?

When we create a PageLayout from the A4 Landscape template and print the layout on a pinter with A4 Landscape paper we get four pages instead of one. We are using the IPage.PageToPrinterMapping = ...
10
votes
3answers
11k views

Creating button in ArcMap to run Python program?

I have a script that I want to run within ArcMap when a button in a toolbar is clicked, and so far I have only been able to make the script into a script tool. I need it to run as a command, not as a ...
6
votes
1answer
1k views

Getting table Name from IObjectClass using ArcObjects?

I'm using IRelationshipClass.DestinationClass to get an IObjectClass. From here, I want to be able to get the table name, but can only access the AliasName. Any ideas? The IObjectClass can be cast ...
0
votes
1answer
158 views

BaseCustomLayer draw is not hit

I create an object derived from BaseCustomLayer which draws a polyline. I call Map.addLayer(myBaseCustomLayer) and the function public override void Draw(esriDrawPhase drawPhase, IDisplay Display, ...
1
vote
1answer
110 views

What's the difference between dynamicDisplay and Display?

The overriden function is public override void DrawDynamicLayer(esriDynamicDrawPhase DynamicDrawPhase, IDisplay Display, IDynamicDisplay dynamicDisplay) What's the difference between dynamicDisplay ...
0
votes
1answer
319 views

Cannot run the Arc samples

When I try to compile I get Error 1 Cannot register assembly "C:\Users\Patrick\Desktop\DynamicBiking\CSharp\bin\Debug\DynamicBiking.dll" - access denied. Please make sure you're running the ...
1
vote
2answers
4k views

“Item not found in this collection” when trying to set the Shape on IFeatureBuffer

I'm working on code to open a 3rd party data file and convert it into a collection of features in a custom layer based on FeatureLayer. I have had no issue importing the data itself (nodal data for ...
1
vote
1answer
957 views

Custom Layer not drawing using ArcObjects?

I have a Customer layer which inherits BaseCustomLayer. I add it to my MapControl via addLayer but the function public override void Draw(esriDrawPhase drawPhase, IDisplay Display, ITrackCancel ...
1
vote
2answers
512 views

DrawPolyLine not drawing completely on the right layer

I zoom into a map, then do a screenDisp.DrawPolyline(polyline); Now the line is in the correct place, but the map that is the background of the polyline object is actually the initial map and not the ...
14
votes
2answers
4k views

Avoiding fails from ArcObjects geoprocessing with .NET?

There are some nice features in ArcToolbox we can use, but for some reason, this is NOT working properly. It doesn't even throw me an error. My software is running inside ArcMap, so no need to ...
10
votes
2answers
2k views

ArcMap extension 9.3 vs 10

I have updated our ArcMap extension to work with ArcMap 10 - mainly just change reference from ESRI.ArcGIS.ADF to ESRI.ArcGIS.ADF.Local and set value of 'Specific Version' property for all references ...
0
votes
1answer
1k views

Use lat / long to create polyline that can be passed into DrawPolyline

public void DrawPolyline(ESRI.ArcGIS.Carto.IActiveView activeView) { if(activeView == null) return; ESRI.ArcGIS.Display.IScreenDisplay screenDisplay = activeView.ScreenDisplay; screenDisplay....
1
vote
2answers
1k views

ArcEngine draw a polyline or multipoint

Does anyone have a bit of code to plot a multiline? I just want to add some IPoints to a collection and display in a particular color and width, but I can't find a good way to do this. Right now I'm ...
4
votes
4answers
3k views

Which API should we use for printing a PageLayout?

We are building an standalone ArcGIS Engine application and we are going to add support for printing. There are several APIs for printing a PageLayout in ArcObjects, in ArcGIS 10 there are at least ...
3
votes
1answer
352 views

determine the closest points on the network?

In ArcGIS, I have only a point layer relating to a hydrography network's pour points. Now I want to write code in VBA that selects a point from this layer, then highlight the closest points to this ...
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
527 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
3answers
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
307 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
690 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
259 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
324 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 ...
14
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****...
2
votes
1answer
392 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
6k 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 ...