Select to view content in your preferred language

How do I run a tool from the Toolbar or ArcGis Pro in code?

2113
3
Jump to solution
07-05-2016 09:16 AM
HoriaTudosie
Frequent Contributor

For example, (as per my requirements,) how do I activate in code the button 'Add Data' form the Layer group, and get notified of the end of the operation?

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
UmaHarano
Esri Regular Contributor

Hi Horia

You can use existing ArcGIS Pro commands in your own add-in by using the FrameworkApplication class' GetPlugInWrapper method.

There are a few samples that shows you how to do this:

Hook Pro Commands sample​.

Identify Window sample

Thanks

Uma

View solution in original post

3 Replies
DanPatterson_Retired
MVP Emeritus

are you looking for the SDK literature specifically ArcGIS Pro SDK | ArcGIS for Desktop

or how to run the quivalent tool to add a layer in arcgis pro

An overview of the Data Management toolbox—Data Management toolbox | ArcGIS for Desktop

specifically those dealing with layers?

An overview of the Layers and Table Views toolset—Data Management toolbox | ArcGIS for Desktop

0 Kudos
HoriaTudosie
Frequent Contributor

I don't want to do the action myself, since the pull-down menu has many options, (and that would be a problem too!)

The thing is that in my UI I have a button with instructions for the user to press on 'Add Data' button, add whatever data s/he pleases then click back my button to continue.

My manager wants that button to automatically do like clicking that button (as I said the pull down menu would be an issue, but for now I have to do what I'm told...)

0 Kudos
UmaHarano
Esri Regular Contributor

Hi Horia

You can use existing ArcGIS Pro commands in your own add-in by using the FrameworkApplication class' GetPlugInWrapper method.

There are a few samples that shows you how to do this:

Hook Pro Commands sample​.

Identify Window sample

Thanks

Uma