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
1answer
45 views

Add a map element with a frame border and background

I am trying to insert a north arrow and a legend into the map with a white background frame and a border with a 3pt gap. The code below partially works, but it changes the background colour of the ...
0
votes
0answers
15 views

Selection anchor when selecting features programatically

In an edit session, I am using code to select multiple features from an SDE polygon layer. After the selection is performed, the user can then use the rotate tool to adjust the features to their ...
3
votes
0answers
41 views

Multiple columns in TOC and Legend in ArcMap

I would like to give the user additional information next to the label in the TOC of a UniqueValueRenderer for each class. I can just add the numbers in the labeltext, but it does not align to proper ...
0
votes
0answers
22 views

Is it possible to obtain the envelope of a Data Frame element in Layout view?

I'm wondering if there is a way to create an envelope in map units of the extent of the Data Frame element in Layout view. I've tried this approach: IMxDocument mxdoc = ArcMap.Application.Document as ...
3
votes
1answer
181 views

How to apply WHERE clause to relationship class using ArcObjects?

I'm trying to query objects related to objects and satisfying some query in ArcObjects. IRelationshipClass interface contains methods for getting all related objects but how can one filter them? I don'...
1
vote
1answer
549 views

How do I convert a GPFeatureRecordSetLayer Feature Set to a Feature Class?

I have C# code to run a geoprocessing package that produces an output which is stored in a GPFeatureRecordSetLayer. Right now I have code that displays the result on the GUI when the job is complete . ...
2
votes
2answers
442 views

Create FeatureClass in Personal Geodatabase and store data

I have to create a new featureClass in my existing personal GeoDatabase. And save some polylines into this featureClass. How can i do it? I need c# code to do this. Edit: I have a problem during ...
2
votes
3answers
2k views

Create a Line FeatureClass from IPointCollection

I want to create a new line layer from a point layer. I store the points in an IPointCollection. I want to use that IPointCollection to create a line IFeatureClass. I know how to create a single ...
0
votes
1answer
492 views

Getting map using C# code in ArcMap?

I have been programming in C# a small code for:1) create a polyline Featureclass in a GDB, 2)put that in the map view (ArcMap 10.2) and finally 3) edit that feature using a button or tool... Well I ...
0
votes
1answer
45 views

Update Attribute with user form input

I try to use this code to fill attribute of map with my form but it dose not work? Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ...
0
votes
1answer
225 views

Code to get featureclass name from existing topology

I am creating and validating topology through vb.net and arcobject code.Things are running fine as I am able to add rule and validate it . Problem is when once the program is run and topology is ...
1
vote
2answers
182 views

How do you make a field read only using Arcobjects?

I have created add-in toolbar with C# arcobjects. I am creating some empty geodatabase shapefiles. While creating featureclass i want to assign some default value to attribute and then make it read-...
0
votes
1answer
562 views

Debugging InvalidCastException was unhandled by user code error from ArcObjects DataStat?

I have some code that adds a bunch of group layers into ArcMap based on a table within ArcMap. The code works fine in VBA, however in VS 2010 I get an error on the "pEnumVar = pDataStat.UniqueValues" ...
1
vote
1answer
42 views

How to access XY position of text element in Layout view using ArcObjects

I'm wondering which interface will allow me to set the XY position of a text element in the page layout of my MXD. I have tried the IElement.Geometry.Envelope.PutCoords(Y, X) to no avail.
0
votes
0answers
24 views

Problem with some C# code in ArcMap 10.2

I have been programming a Base Tool control using C# to allow me to initialize the edition of a specific featurelayer in an ArcMap view; a time ago I used to do the same thing in ArcMap 9.3 and it ...
1
vote
1answer
40 views

Cannot export IActiveView to PDF, invalid pixel bound value(s)

I understand that you have to re-orient the XY/min/max to fit a tagRECT but I'm still getting an "Invalid pixel bound value(s)" error. I have also tried setting Ymin/Ymax = bottom/top but I get the ...
2
votes
0answers
40 views

ArcMap custom extension registered but not added

I haven't found any info on this particular problem so let me try here. My job is to migrate a 9.3 desktop extention to 10.3, keeping the app in the original COM-based format (not converting it to an ...
1
vote
1answer
543 views

Join and Calculate vb.net

I'm trying to join an excel table to a shapefile and then calculating those fields using vb.net. The code I have written has no errors, but won't work when I try it in ArcGIS 10.1 and I'm out of ideas....
2
votes
2answers
49 views

ESRI.ArcGIS.Desktop.AddIns could not be found. Visual basic build error

I am trying to compile a project in visual basic into an Arc map add on. I am receiving two warnings that are preventing the build from completing. Both errors entail that the assembly ESRI.ArcGIS....
0
votes
0answers
15 views

Cannot pan to correct location using IEnvelope.CenterAt(IPoint)

It seems no matter what projection I try it pans me to the Atlantic Ocean. I have run across this before in an ArcPy script and it was due to being in a projected coordinate system and thus it was ...
1
vote
1answer
195 views

INTERSECT tool in arcobjects

I am using geoprocessing tool Intersect in Arcobjects. How to pass two input feature classes in to in_features option in INTERSECT tool could you please tell me how to pass. Geoprocessor gp = new ...
1
vote
1answer
28 views

Cannot center IActiveView at IPoint in C#.NET add in

I'm testing a simple portion of my add in and can't get it to center/pan to a specified point, I've included what is currently in my OnClick() method. No errors appear it just refreshes and nothing ...
0
votes
1answer
625 views

How to call a GP service from ArcObjects in .NET using ArcGIS Engine 10.2?

I published and successfully accessed a GP service in ArcMap 10.2, but I couldn't make it work in my .NET program using ArcObjects 10.2: IGeoProcessor gp = new GeoProcessorClass(); gp....
6
votes
2answers
1k views

Display map scale (like 1:20.000) next to ScaleBar

In my PageLayoutControl I add a ScaleBar. Additionaly I like to show the map scale/ratio (e.g. "1:20.000") next to it, but didn't find a way to achieve this with the ScaleBar. Am I missing something ...
16
votes
3answers
2k views

Algorithm to find out points of inflection for a polyline

I am trying to find out the points of inflection , i.e. points where the curves in a line start and end. If you look at the image, the green line may be a road or a stream, and the black points are ...
2
votes
0answers
64 views

How can I get representation geometry created by rules (not manually overrided) using arcobjects.net?

I have feature class with representation rules and now need to extract representation geometry from selected features. If representation geometry is manually overrided, I can get it just using ...
4
votes
2answers
902 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
2k 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
3answers
6k 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 ...
2
votes
0answers
57 views

Change coordinate system to add buffer in meters

I have am trying to add functionality to allow users to find points that are within a buffer distance inside or outside the parameter of a polygon. The map is in IProjectedCoordinateSystem so to my ...
1
vote
0answers
45 views

I want to cut polygons in a polygon layer.

I want to programmatically cut polygons already loaded in arcmap. For instance if originally I have 1 polygon feature and 1 row in attribute table. When I cut them, I should see 2 independent features ...
2
votes
0answers
34 views

ArcObjects Custom Tool for a VB App

We have an old VB6 app that uses the map, toolbar and toc controls. On the toolbar, we've added the custom menu so users can add other built-in tools or tools they've created. One of our customers ...
6
votes
2answers
336 views

Build Network Dataset with python comtypes

I know this isn't possible in arcpy, so I thought I'd give it a stab using comtypes. I am trying to translate some of the VB.NET code to create a network dataset from the help docs: http://resources....
4
votes
0answers
44 views

How to prevent automatically redraw the graphic layers on ArcObjects?

After a Shape File that was read to IFeatureLayer converted to IGraphicElements, I'm trying to draw that on map (using Sublayer of ICompositeGraphicsLayer). Of course, I succeed to display it on map, ...
3
votes
0answers
30 views

Exporting ActiveView to Jpeg using ArcGIS 10.2.2 fails

I have some legacy VBA code that exports the activeview to a jpeg, which needs to be updated, so it can be used in ArcGIS Desktop 10.2.2. The application uses the following code Option Explicit ...
2
votes
0answers
31 views

Get Z value from point in LAS Dataset using ArcObjects

Using ArcObjects (C#) I am trying to build a tool that will extract the Z value from a point in a LAS Dataset when the user clicks on it (then use that value elsewhere). My intention was to use the ...
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 ...
15
votes
1answer
742 views

Understanding why ArcPy Cost Path Analysis tool faster than ArcObjects? [closed]

Although I use 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 posted ArcGIS ...
2
votes
0answers
31 views

Creating a Legend with arcpy and comtypes

I am relatively new working with python and arcobjects. Under normal limitations I know that you cannot create a Legend or any arcobject with arcpy.mapping. Is there a generic example of creating a ...
2
votes
0answers
35 views

Is it possible to create an ArcGIS library?

Can I create my own ArcGIS library that contains commonly used features inside my own functions/methods? I would like to make a dll that can be reference in my projects for using common features such ...
0
votes
1answer
33 views

How to read a tile package file(.tpk) in ArcObject C#?

I should read and show some tile package file using ArcObject C# 10.x. However, I failed to find how to read an tile package file on My Application using ArcObject C#. So, please tell me about ...
2
votes
1answer
24 views

The type 'ESRI.ArcGIS.Display.RgbColorClass' has no constructors defined

Trying to create a simple line symbol. But getting an error: "The type 'ESRI.ArcGIS.Display.RgbColorClass' has no constructors defined" public override void OnClick() { IDocument pdoc = ...
1
vote
3answers
2k views

Objects in this class cannot be updated outside an edit session

HI i am trying to update my feature class with some new parameters using IEditWorkSpace, Following is my code --- IWorkspaceFactory workspaceFactory = new AccessWorkspaceFactory(); IWorkspace ...
1
vote
1answer
20 views

Getting trouble with prefix clause for an ArcObjects Java query filter

I'm using ArcObjects/Java for ArcGIS 10.2.2 and I'm trying to get unique values of a field for a feature class. Here's my current code: List<String> values = new ArrayList<String>(); ...
2
votes
1answer
24 views

ArcGIS server extension: Marshal.ReleaseComObject() or not?

The ServerSimpleImageServiceRESTSOE example uses Marshal.ReleaseComObject(). The other examples seem to not use this. When should I use Marshal.ReleaseComObject()? As I understand if I am not using ...
1
vote
0answers
30 views

Validation on save in arcobject

I want to validate all the features that have been changed since last save. Currently I'm trying to do this in an ESRI.ArcGIS.Desktop.AddIns.Extension. My sde database is not versioned. public class ...
1
vote
1answer
212 views

Scripting creation of cogo polylines including curves

Is it possible to create polyline features from cogo type text files? I have some files that have survey type coordinates in them and they contain straight line segments as well as curves (defined by ...
3
votes
1answer
47 views

ArcObjects in ArcMap 10.2.2 UpdateCursor refer to a calculated field value in the same Cursor

Is it safe to calculate a field value inside an update cursor and refer back to this calculated value to change another field value of the same row? I think some code will actually explain my ...
2
votes
1answer
54 views

Determine if Point is in feature class attribute table

I'm working with ArcObjects, C# and ArcMap. I have an attribute table that has several rows of data including a "shape" field that holds a point geometry. I also have a random point. How can I iterate ...
1
vote
2answers
49 views

Changing layout background from red to blue through button add-in with C# and ArcObjects?

I am working on Arc Objects using C# and I have to make a button add in, such that if I click button one time then layout background color changes to red and then if I click again then button add in ...