Cannot add new maptool control

875
2
Jump to solution
02-25-2016 06:01 AM
Highlighted
New Contributor III

Hi,

We're unable to add a maptool control to our Add-In project. We have the latest version of Pro and the SDK installed (we uninstalled beta version properly).

In our visual studio project we goto Add > New Item > ArcGIS > ArcGIS Pro Map Tool and this creates the class for us.

But the MapTool class cannot be found in ArcGIS.Desktop.Mapping namespace:

Cannot resolve symbol 'MapTool'

The dll reference is correctly inlcuded in project, and imported with using statement as above.

If I use the assembly explorer and look  in ArcGIS.Desktop.Mapping, there is no MapTool class. But it is listed in the API page here:

http://pro.arcgis.com/en/pro-app/sdk/api-reference/topic9155.html

What's going on here? We have tried to reinstall ArcGIS Pro and the SDK, but did not fix the issue.

Other control types (e.g. button, dockpane) work fine.

Can somebody help?

Thanks,

Luke

p.s. I tried adding a maptool to a NEW arcgis pro module project and it worked. So I guess there is an issue with our current project. Any ideas?

Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
New Contributor III

Ok nevermind - I fixed it. I was missing ArcGIS.Desktop.Extensions reference from the project.

View solution in original post

Reply
0 Kudos
2 Replies
Highlighted
New Contributor III

Ok nevermind - I fixed it. I was missing ArcGIS.Desktop.Extensions reference from the project.

View solution in original post

Reply
0 Kudos
Highlighted
Esri Contributor

Hi Luke, you might find these links helpful:

Map Exploration Samples
MapTool concepts

Reply
0 Kudos