POST
|
In the Visual Studio Add-in 10.1 project, open the Config.esriaddinx file and change the version to 10.0. Then recompile the project, select 'No' to ignore the 'update'. The newly created add-in file ('esriAddIn') can be used to install on ArcGIS 10.0 system. But, again, if there's anything in the addin using new 10.1 functionality, it won't work on 10.0. No, that didn't work for me either. The add-in installed ok, but then ArcMap either crashed on startup or when clicking on one of the add-in's toolbar buttons (can't remember now). I didn't use any 10.1 new functionality. So on my development machine I just removed ArcMap 10.1 and sadly switched back to 10.0.
... View more
08-29-2012
06:48 AM
|
0
|
0
|
948
|
POST
|
To tell the whole story, I had a go with C#, but realised I don't have enough time right now to learn it. And then I thought I could maybe raise my dead VB skills... Which is sad, I know... 😛
... View more
07-15-2012
10:25 AM
|
0
|
0
|
740
|
POST
|
Well Leo, you've pretty much confirmed what I was already suspecting: there's no way of having a java solution that gives consistent results. Unfortunately, to me (and to my my client) it's not acceptable to have a dialog that sometimes pops up and some other times pops under the ArcMap window. So, sadly, I've downloaded Visual Studio Express and switched to VB.NET (hoping to remember something from the old VBA times...). Thanks a lot for your help Alberto
... View more
07-14-2012
02:55 AM
|
0
|
1
|
740
|
POST
|
Leo, thank you for your reply. I see your point, but unfortunately I need to create a JDialog (not a JFrame) because I need a modal window. And to make sure the JDialog stays on top of the ArcMap window (and inside it) I need to specify its parent component. But I don't see any way of doing it when I instantiate the JDialog in my Button's code... Cheers Alberto
... View more
07-13-2012
03:34 AM
|
0
|
0
|
740
|
POST
|
Hey Leo, I'm facing the same problem. I can't find a way to pass the parent component neither to JOptionPane nor to JDialog. I hoped I could pass com.esri.arcgis.addins.desktop.Button as parent at least to JOptionPane, but unfortunately it does not extend java.awt.Component... I've checked the samples on the esri web site, but they always set null as parent component... Have you found a solution? Alberto
... View more
07-10-2012
07:29 AM
|
0
|
0
|
740
|
POST
|
ldonahue, when I clicked the "class" hyperlink to create my "Button 1" class, the options on the dialog were the same as yours, and the class was created in the right project. But looking at your class code I noticed that my class was missing the init method (I should have checked that in the first place, my bad)!!! Nevertheless, after adding the missing method, I still couldn't see my button in the Customize dialog. I checked the log files, and realized that I had set the wrong JDK version (1.7) in Eclipse when I created the add-in: INFO::Successfully created an instance of : com/esri/arcgis/addinframework/AddInFactory
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
Caused by: java.lang.UnsupportedClassVersionError: Button1 : Unsupported major.minor version 51.0
... So I went back to Eclipse, compiled the project with the right JDK version (1.6), and finally the command was there! Thanks a lot for your help, very appreciated Alberto
... View more
05-31-2012
11:06 PM
|
0
|
0
|
520
|
POST
|
I deleted the add-in cache, but that didn't change things either. Do you know if there is any log file I could check? I enabled the "Create console..." option from the ArcGIS Java Configuration Tool, but no error messages are shown... Alberto
... View more
05-31-2012
07:32 AM
|
0
|
0
|
520
|
POST
|
After creating the add-in, I just pushed the "Add..." button to created a Button, and the class was already named Button1. Then, I clicked the "class" hyperlink, and accepted all the default values (just clicked "Finish"). Alberto
... View more
05-31-2012
06:54 AM
|
0
|
0
|
520
|
POST
|
Thank you guys for your patience. I attached to this message the screen cap from Eclipse and the content of the xml file itself. Alberto <?xml version="1.0" encoding="UTF-8"?>
<ESRI.Configuration xmlns="http://schemas.esri.com/Desktop/AddIns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Name>TestAddIn3</Name>
<AddInID>92421ca6-0137-1000-5000-93a2889e0000</AddInID>
<Description></Description>
<Version>1.0</Version>
<Image></Image>
<Author></Author>
<Company></Company>
<Date>Mon May 28 09:03:55 CEST 2012</Date>
<Targets>
<Target name="Desktop" version="10.0"/>
</Targets>
<AddIn language="JAVA" library="TestAddIn3.jar">
<ArcMap>
<Commands>
<Button caption="NewButton1" category="JavaCommands" class="Button1" id="button1"/>
</Commands>
</ArcMap>
</AddIn>
</ESRI.Configuration>
... View more
05-31-2012
06:29 AM
|
0
|
0
|
520
|
POST
|
Thank you dorisriedl, I've checked and made sure there were no blanks in my command and category names. I also removed the space between "Java" and "Commands". No luck. Alberto
... View more
05-31-2012
05:08 AM
|
0
|
0
|
769
|
POST
|
Ok, you've got my same setup (i've got win7/64 though). I did what you advised: - removed my add-in from add-in manager - re-exported the add-in from eclipse (yes, it's an arc-map add-in) - re-added add-in to arcmap (see attached screen cap, left) - command still not available on command list (see screen cap, right) [ATTACH=CONFIG]14687[/ATTACH] D'oh! Alberto
... View more
05-27-2012
11:10 PM
|
0
|
0
|
769
|
POST
|
ldonahue, the values are "New Button 1" and "Java Commands" (these are the names listed in the Add-In manager too). Nevertheless, the category "Java Commands" doesn't even exists in the Commands list. What configuration do you have? Is your system 32 or 64 bit? I feel like I'm missing something big here, because from the tutorials setting up a java arcmap add-in seems like a piece of cake... Maybe my service pack version is bugged (AG10 w/ sp4)? Maybe special privileges are needed? Alberto
... View more
05-25-2012
07:33 AM
|
0
|
0
|
769
|
POST
|
Thank you ldonahue for your reply. I went through that tutorial, and created a simple add-in with just one button popping up a message. The add-in installed ok (I got the "Installation succeeded" message, and the add-in is listed in the Add-in manager), but when I go to the Commands list to add the button to an existing toolbar, the "Java Commands" category (where the button is supposed to be) isn't even there. I then checked my system's default JRE version, which actually was 64 bit. I removed it from the system, so now the default version is the 32 bit 1.7.0_02, but my problems are still here... Any other suggestion? Alberto
... View more
05-23-2012
11:32 PM
|
0
|
0
|
769
|
POST
|
Hello everyone. Since ArcGIS 10 supports java for desktop development too, I tried to set up a java add-in for ArcMap. Before writing my own add-in I had a go with one of the samples provided by the Java SDK, called "simpleaddin". I can add the add-in to ArcMap without problems, and I can see it listed in the Add-In Manager. Unfortunately, when I bring up the add-in toolbar (SampleJava Toolbar) in ArcMap, no custom commands are shown, just a bunch of labels saying "missing". Native ArcMap commands (like Fixed Zoom Out) are visible on the toolbar though (see attached image). I also tried to create my own add-in, following the instructions given in this video: http://resources.arcgis.com/gallery/video/java/details?entryID=F8A0A38E-1422-2418-7FA3-CC2C83ED9674 but in this case I couldn't even find my custom command in the commands list under "Customize". I tried on two boxes, both running win7/64 and ArcMap w/ the most recent SP available installed. Any clues? Thanks a bunch Alberto
... View more
05-23-2012
05:10 AM
|
0
|
17
|
4515
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|