Hot answers tagged

16 votes
Accepted

Debugging ArcMap Add-In .Net 4.5 in Visual Studio 2013: Unable to start ArcMap.exe

In Visual Studio 2013, to fix this check Use Managed Compatibility mode in VS2013 > Options > Debugging > General (last option in the list). Original answer by Preston McCormick here
staker4's user avatar
  • 381
4 votes
Accepted

exporting 10.2 .esriaddin to 10.0

Addins are not backwards compatible and cannot be installed on an earlier version of ArcMap. You'll have to set up a development machine or VM with ArcGIS 10.0 and Visual Studio 2010 to compile the ...
jon_two's user avatar
  • 1,834
4 votes
Accepted

How to make a 10.0 ArcMap AddIn project valid for ArcGIS 10.3 SDK?

After I manually added a new button, I circled back to the SDK AddIn Component Wizard Issue and figured out how to resolve. Before posting this question, I did attempt to change the targets in the ...
Jay Cummins's user avatar
  • 14.6k
4 votes

Arcobjects 10.3.1: TOC listeners

I'm not sure what you want to do exactly, but it looks like you want to receive an event when a layer is added to, or deleted from the map, right? Here's a sample: private IActiveViewEvents_Event ...
Berend's user avatar
  • 4,597
4 votes
Accepted

Visual Studio 2015 Error when running ArcMap add-in

To quote this thread, Visual Studio 2015 "will install correctly, and create projects, but will not allow you to build a project without having VS2013 installed as well."
cevondanady's user avatar
4 votes

AddIn button/tool force Arcgis 10.2.2 to close

If I have understood you are developing on a 10.3 machine and manually (?) editing the configuration file to say it's a 10.2 addin, is this correct? If you are developing for a 10.2 environment you ...
Hornbydd's user avatar
  • 42.9k
4 votes
Accepted

Referencing ArcMap in class library using ArcObjects?

I have got this to work, but not using AppRot (one problem is that there could be multiple instances of ArcMap and ArcCatalog), but to just pass the ArcGIS application object from the addin. Within ...
MapMan's user avatar
  • 2,144
4 votes
Accepted

Inscrutable behavior of ArcMap add-in?

If something in ArcMap should be working and isn't there are a couple cuprits that crop up regularly. First check out %AppData%\Roaming\ESRI\Desktop10.X\ArcMap\Templates\Normal.mxt. Back that file up ...
danielm's user avatar
  • 1,539
4 votes

Adding button in LayerSwitcher (Openlayers)?

This is really not a GIS related question but completely HTML/JS related one, but anyway, all you have to do is add a button HTML element in sidebar after <div id="layers" class="...
TomazicM's user avatar
  • 24k
3 votes
Accepted

Unable to make "IDataStatistics:UniqueValues" work in .Net

Looks like IDataStatistics.UniqueValues returns a System.Collections.IEnumerator Frankly, I've found it easier to just use a search cursor and populate a Generic Dictionary than to deal with ...
Kirk Kuykendall's user avatar
3 votes

Visual Studio 2015 Error when running ArcMap add-in

I figure some people might don't want to install 2013 along side 2015, this is another simpler workaround that worked for me.. ValidateAddinXmlTask is not that important if you know your XML is good. ...
hnasr's user avatar
  • 655
3 votes

Debugging ArcMap Add-In .Net 4.5 in Visual Studio 2013: Unable to start ArcMap.exe

Here is how I resolve this issue and it works pretty much every time it comes up. Restart VS2013 Right click on project -> Debug -> Start new instance (this will prevent it from building first) ...
przemyslaw tyrtania's user avatar
3 votes

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

One of the disadvantages of developing Add-Ins in .NET is that each new version of ArcGIS uses a different incompatible version of ArcObjects and a different incompatible version of Visual Studio. ...
JDMorganArkansas's user avatar
3 votes

Button in ArcGIS add-in extension shows as "Missing"?

Usually I see this if the Windows environmental variables aren't set up correctly. Try: Start command prompt (go to Start Menu ---> Run ---> type cmd) Type python, and then import arcpy (shown below ...
ianbroad's user avatar
  • 9,131
3 votes

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

While the SDK is required to create new projects (the templates that appear when you choose File>New Project), it should be possible to compile existing projects without the ArcObjects SDK. Also, ...
Kirk Kuykendall's user avatar
3 votes
Accepted

QGIS: Style-"Rule-Based"

Now I understand your point. Adding subcategory to rule-based style is not working in QGIS 2.16.2, but actually it works using QGIS 2.14.6 long term release (LTR). Here is the output using Rule-Based ...
ahmadhanb's user avatar
  • 40.5k
3 votes

Referencing ArcMap in class library using ArcObjects?

If you need to create an Application reference then you can create an IMxDocument object which will create a new Application object. http://edndoc.esri.com/arcobjects/9.2/ComponentHelp/esriArcMapUI/...
danielm's user avatar
  • 1,539
3 votes
Accepted

Temporarily disable snapping with Arcobjects add-in tool

You can override OnKeyDown and OnKeyUp. Check if it was the space bar that is up and down. You can then set pSnappingEnv.Enabled to True or False which should toggle snapping on and off. ...
danielm's user avatar
  • 1,539
3 votes
Accepted

Can't save persisted IGeometry object into an ObjectStream

I've come with a workaround. @MichaelStimson 's comment about a potential wrong cast helped and made me think to go and just try with another stream object. IMemoryBlobStream just worked fine for me: ...
Jose's user avatar
  • 175
3 votes
Accepted

Adding AddIn to ArcMap UI automatically after AddIn installed?

Yes, I stopped counting the number of times I had to explain a user how to drag a button from the Customize dialog to a toolbar ;-) What you could do is to add an Extension class to your addin (if you ...
Berend's user avatar
  • 4,597
3 votes
Accepted

How can I Embed BaseTool to winform in ArcObjects?

I believe you need to specify the two optional parameters to the Find method: documentBars.Find(cmdID, false, false); From the Documentation: noRecurse Use False to search all menus and toolbars for ...
Berend's user avatar
  • 4,597
2 votes

Why can't the breakpoint be "hit" when debugging an ArcGIS 10 Add-In?

For those targeting .Net 4.0 Framework, following worked for me. As per many suggestions modify ArcMap.exe.config and ArcCatalog.exe.config to target 4.0 framework <?xml version="1.0" encoding="...
Nilster's user avatar
  • 86
2 votes
Accepted

Get currently open Attribute Window

The following will get you the layer or standalone table (IStandaloneTable) of the active table window: var pTableWindow3 = new TableWindow() as ITableWindow3; if (pTableWindow3.ActiveTableWindow == ...
Dan Jurgella's user avatar
  • 2,368
2 votes

Can you edit an ESRI addin outside of Visual Studio?

Not trying to be unhelpful, but if you believe that an AddIn is the same thing as a .zip file, you probably should not be editing the code. You may just damage things further. To learn more about ...
MaryBeth's user avatar
  • 3,686
2 votes

Can I compile an addin developed in ArcGIS 10.3.1 for use with 10.1 and 10.2?

You can compile it for lowest supported version. As long as you aren't using features that were added in a later version it will be forward compatible. So in your case build it for 10.2. Be sure to ...
Rich Wawrzonek's user avatar
2 votes

Unable to make "IDataStatistics:UniqueValues" work in .Net

I was incorrect in saying that no suggestion in THIS post worked. Over the last decade I learned to always seriously consider anything mr. @Kirk Kuykendall posts with extra attention. The credit for ...
Jakub Sisak GeoGraphics's user avatar
2 votes
Accepted

Button in ArcGIS add-in extension shows as "Missing"?

I have seen this in the past - happened on half of our work PCs one day and we never did find the cause, however we did find a work-around. Instead of loading our add-ins into the default location (...
Midavalo's user avatar
  • 29.6k
2 votes

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

Red -> Blue -> Green -> Red etc. Just wrap your pPage.BackgroundColor = in if/else if/else something like if (pPage.BackgroundColor.RGB == ic.RGB) { pPage.BackgroundColor = ib; } else if (pPage....
Midavalo's user avatar
  • 29.6k
2 votes

Error installing addons in GRASS 7.0.2: File is not a zip file?

What is your OS, Windows, Linux, Mac OS X ? It is important because the addon needs to be compiled From g.extension On MS Windows systems, where compilation tools not readily available, g....
gene's user avatar
  • 54.4k
2 votes
Accepted

Error installing addons in GRASS 7.0.2: File is not a zip file?

Version 7.0.2 is an older one. The current release is 7.0.4: https://grass.osgeo.org/news/56/15/GRASS-GIS-7-0-4-released/ If you are speaking about MS Windows, the older addons are still online but ...
wenzeslaus's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible