New answers tagged

0

This is a good case for a global variable: namespace lecture5test { public class Button1 : ESRI.ArcGIS.Desktop.AddIns.Button { private int ClickCount = 0; // global to keep track of clicks public Button1() { then in your OnClick event: protected override void OnClick() { ClickCount ++; // go to next click colour ...


1

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.BackgroundColor.RGB == ib.RGB) { pPage.BackgroundColor = ig; } else { pPage.BackgroundColor = ic; }


1

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 (My Documents I think) we set up Additional Add-In folders in ArcMap and copied our Add-In files there, and they work fine. We didn't have to put all add-ins ...


1

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) Does everything work without errors? If you get an error, then try: Right click on My Computer and go to Properties, then click on the Advanced ...


0

Have you tried using this pattern: Dim windowID = New UIDClass() windowID.Value = My.ThisAddIn.IDs.DockableWindow1 Dim dockableWindow As IDockableWindow = My.ArcMap.DockableWindowManager.GetDockableWindow(windowID) Where 'DockableWindow1' is the name of your dockable window in the Config.esriaddinx file.


2

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 IDataStatistics.


0

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 this answer should go to him but since the OP didn't mark the original question as answered I will do it here and if Kirk can just copy his comment here and make ...



Top 50 recent answers are included