I am accessing and executing the GoToXY tool but I cannot find any methods in the api that allow me to set the default latitude and longitude. On the click of a button, I want the GoToXY control to open with preset latitude and longitude values. I thought that maybe the lat and long would be children of the wrapper but when I accessed the children property of the plugin wrapper, it returned an empty list. Uma Harano Wolfgang Kaiser
protected override void OnClick()
{
var commandId = "esri_mapping_gotoXYControl";
var iCommand = FrameworkApplication.GetPlugInWrapper(commandId) as ICommand;
if (iCommand != null)
{
// Let ArcGIS Pro do the work for us
if (iCommand.CanExecute(null))
{
iCommand.Execute(null);
}
}
}
Hi Marvis,
It is not supported to set defaults to this Pro tool.
But you can definitely create your own "Embeddable control" using the Pro SDK template. It will allow you to create the UI required on to the Map view to perform something like this.
Samples:
Basic Map tool with Embeddable control
Thanks
Uma
I was hoping to take advantage of the pre-existing functionality of the GoToXY tool like panning, zooming,etc. If I use the samples you provided, I would have to write that functionality from scratch....?