Custom add-ins using ArcGIS Runtime SDK for Java

5673
3
05-22-2015 09:17 AM
DavidStefan
New Contributor III

Is it at all possible to create a custom add-in (toolbar, button, etc.) using the ArcGIS Runtime SDK for Java? If it is possible, please provide me with a link to a guide/tutorial. If it is not possible, what is the best way to provide a solution to the problem below?

I would like to allow ArcMap users to select a number of features on the map, and then, at the click of a button, display a dialogue with information about these features that is pulled from a database. There should be a number of buttons each of which will run different script at the background providing different information about the selected features. The dialogue with the information should allow users to save the displayed information into an excel file.

I have tried to approach this by developing a Python script with a Tkinter GUI, but this entails certain problems. For example, the script has to be run in the foreground with visible process dialogue (to access the current map and the selected features), the user needs to go through the parameters pop-up even if no parameters are required, if the script is not run "in process" then executing it from a Python add-in crashes ArcMap.

It seems that ArcObjects SDK for Java might do the job, but I haven't been able to figure out how to get the package (ArcGIS Runtime SDK for Java, on the other hand, is easy to obtain from Esri website).

0 Kudos
3 Replies
BrentHoskisson
Occasional Contributor III

You may have to talk to your sales rep about getting the SDK if it is not in your list of downloads.  Do you have an EDN subscription?  As far as developing the add-in you could start here:

http://help.arcgis.com/en/sdk/10.0/java_ao_adf/conceptualhelp/server/index.html#//000100000336000000

0 Kudos
FreddieGibson
Occasional Contributor III

What you're wanting to accomplish would not be possible with the ArcGIS for Runtime SDK. This is a separate product from the ArcGIS Desktop series and would resemble what you've probably run into trying to use GUIs built in python outside of an ArcMap process.

To build Add-In components you would have to utilize the ArcObjects .NET or Java SDKs, which would be available on your MyEsri account. If you were to use Runtime you'd need to run a separate application outside of ArcMap as somewhat of a viewer. It wouldn't be able to communicate directly with ArcMap, but you could in theory use an ArcObjects Addin to launch an Runtime application that connects to a service with your data and allows the user to interact with it.

If you were to build this tool as an ArcMap addin you'd be able to both read the data directly and access information within the map without have to create a lot of "hacks" to communicate between two separate products.

0 Kudos
KenGalliher1
Esri Contributor

With the exception of directly accessing a geodatabase, I believe most if not all of the requirements listed above could be met in a Runtime for Java app.  Maybe not in the sense of installing an "add-in" into an existing application but Java Runtime provides the selection, query and information display functionality needed to build a custom application from scratch that meets these requirements. 

Outside of the ArcGIS Runtime SDK, one could use the native Java FileWriter to export a JTable to a .csv file. There are other 3rd party packages that can provide this functionality.

The key here is data access. If there is access to the data, the functionality exists to select one or more features, query by attributes, display tables of information, display graphs and calculations, etc.  Accessing geodatabase data would require ArcGIS Server services, offline geodatabases created from feature services or map packages.  The Runtime SDKs do not provide direct geodatabase access.  An ArcObjects application would be necessary to accomplish this programmatically.

Here are some examples that could be useful in visualizing what this would entail:

Runtime SDK examples

Find | ArcGIS for Developers

Selection mode | ArcGIS for Developers

WebMap charts | ArcGIS for Developers

Query by attribute | ArcGIS for Developers

Offline feature table query | ArcGIS for Developers

Local Server feature layer | ArcGIS for Developers

Java examples

FileWriter (Java Platform SE 7 )

Apache POI - the Java API for Microsoft Documents

0 Kudos