Questions tagged [arcobjects]

ArcObjects is a development environment for ArcGIS applications by ESRI.

Overview

ArcObjects is a set of COM-based APIs from ESRI Inc. that are used in several of their products, ArcGIS Desktop, ArcGIS Engine and ArcGIS Server.

The APIs can be used several developer platforms including .Net (VB.Net/C#...), Java, C++.

Tag usage

For non-development questions, see GIS Stack Exchange

196 questions
14
votes
2 answers

Enable native code debugging to deep into COM-object

I have some code that uses a 3rd-party lib (ArcObjects) exposed by COM. So for instance there´s the IGeometry-interface. IGeometry geometry = GetGeometry(); Now when I want to look at the objects members I open a QuickWatch: I´ve read several…
MakePeaceGreatAgain
  • 35,491
  • 6
  • 60
  • 111
10
votes
1 answer

How does Visual Studio's debugger/interactive window dump the properties of COM Objects in .NET?

In this related question, I noted that Visual Studio's debugger is able to enumerate the properties of System.__ComObject references, which is "a hidden type used when the wrapper type is ambiguous" -- e.g., the type of object you get when you…
blah238
  • 1,796
  • 2
  • 18
  • 51
6
votes
2 answers

"ESRI.ArcGIS.DataSourcesGDB.FileGDBWorkspaceFactoryClass" cannot be embedded

I made an add in application for arcmap in C# and I tried to connect with my File Geodatabase. So when I tried to run it I got this error: Error 1 Interop type 'ESRI.ArcGIS.DataSourcesGDB.FileGDBWorkspaceFactoryClass' cannot be embedded. Use the…
Loko
  • 6,539
  • 14
  • 50
  • 78
4
votes
1 answer

How do you save an object to a fooSettings.settings file in Visual Studio?

Can you save an object to a settings.settings file in Visual Studio? If so how? I think you can make your object serializable and it should persist, but I'm not sure if I'm doing it right i.e. when I try to get the object back it is always…
Vidar
  • 6,548
  • 22
  • 66
  • 96
4
votes
2 answers

Rhino.Mocks and ref parameter

I'm having problems to test a method that has a ref parameter. I'm not the library/code owner, so I can't change it, so please do not suggest that I remove the ref parameter. I'm using this website as…
George Silva
  • 3,454
  • 10
  • 39
  • 64
3
votes
1 answer

"Option Strict On disallows implicit conversions" inconsistent enforcement

configuration 1: building ESRI add-ins for ArcMap 10.4 using Visual Studio 2015 targeting the .NET 4.5.2 framework configuration 2: building ESRI add-ins for ArcMap 10.3 using Visual Studio 2013 targeting the .NET 3.5 framework configuration 3:…
isburns
  • 41
  • 5
3
votes
5 answers

Writing an extension method for type T; how can I add a type constraint for a field of T?

Initial situation: I am working with a proprietary framework (ESRI's ArcGIS Engine) which I want to extend with some new functionality. I've chosen to use extension methods in C# for this. Shown below are the parts of the framework API that are…
3
votes
1 answer

Add Search and sort function to data binding wrapper

I'm using a C# wrapper of ITable object (ESRI ArcObject Table), but this wrapper misses sorting and searching functions. Is there a way to add these functions? How could I do it?
geogeek
  • 1,274
  • 3
  • 25
  • 42
2
votes
3 answers

how to set input and output parameters in arcobjects using c#, which call python script?

I have written a python script to geoprocessing ArcGIS data and set the workspace, input and output parameters inside the python code as: env.workspace = arcpy.GetParameterAsText(0) # input feature class inFeatures = arcpy.GetParameterAsText(1) #…
user1293655
  • 31
  • 2
  • 5
2
votes
1 answer

How to determine whether a geometry is multi-part?

The title basically says it all. In my case, I have a polyline and I have to find out if it is multi-part or single-part. In general, the entire Internet (searched via Google), and ESRI's online material in particular, has proven rather neutral on…
Jacques Bosch
  • 2,165
  • 3
  • 25
  • 36
2
votes
1 answer

Run all tests in same thread NUnit

I have some tests that do some write-operation on a database. I know that´s not really unit-testing, but let´s leave that asside. In order to enable every test to work on a clean workspace, I rollback all transactions doe so far. However I randomly…
MakePeaceGreatAgain
  • 35,491
  • 6
  • 60
  • 111
2
votes
1 answer

Python, ArcObjects, and .AppRef: how to get from IAppROT to IMxDocument?

I am writing an external Python/comtypes script (in PythonWin) that needs to get a reference to the current ArcGIS 10.0 ArcMap session (through the ArcObjects COM). Because the script is outside the application boundary, I am getting the…
celticflute
  • 121
  • 4
2
votes
1 answer

"myapp.exe has triggered a breakpoint" while debugging - afterwards slow symbol loading in Visual Studio 2015 Update 3

We have a C++ project in STA mode which opens an C#/WPF lib that hosts an ESRI ArcEngine MapControl via WindowsFormsIntegration. This worked fine in Visual Studio 2013. Since we switched to VS2015 Update 3 starting the ArcEngine part while debugging…
gumo
  • 645
  • 15
  • 35
2
votes
1 answer

How to clear an ILayer?

I can clear all the layers using mapControl.ClearLayers(), but I only want to clear one layer (a sublayer of a basemap, like cities). I'm new at this, thanks in advance. edit: i am using C#
patrick
  • 16,091
  • 29
  • 100
  • 164
2
votes
1 answer

How to create variables from strings in arcobjects?

This hopefully is a simple question with a simple answer. If I have a list box or something that has a list of like 4 years (like 2006 through 2009), how do I programmatically make variables of these years with names like pTable2006, pTable2007,…
Adrian
  • 23
  • 1
  • 3
1
2 3
13 14