Using ArcGIS Pro 2.0(1) SDK, how can I initiate the command "Share as Web Layer" as I do from the popup menu on the layer from the content dialog:
Also, how can I pre-populate the parameters of the tool:
I need the user just to check and click Publish...
Any way to access this in 3.x?
Hi,
You can open "New WEB layer" using ID (esri_sharing_SharingAsWEBLayerCXMUBtn)
var commandId = "esri_sharing_SharingAsWEBLayerCXMUBtn";
IPlugInWrapper wrapper = FrameworkApplication.GetPlugInWrapper(commandId);
var command = wrapper as ICommand;
if ((command != null) && command.CanExecute(null))
command.Execute(null);
Another way is to open geoprocessing tool dialog using Geoprocessing.OpenToolDialog
Hi and thanks for the swift help!
I'm using the 3.2 SDK, and i can't get any of these to work.
Command is null, and OpenToolDialog returns "tool not found".
Is there any documentation available for the "esri_sharing_SharingAsWEBLayerCXMUBtn" command?
Right now i'm calling a share script from a py toolbox using Geoprocessing.ExecuteToolAsync, but i really don't want to rewrite the whole shareAsWebLayer dialog.. So the idea is to do some checks, filtering, metadata and database-stuff before passing the args to the shareAsWebLayer tool.
ICommand.Execute didn't work because i had no selected layer, or the layer selected was not the correct type. Still it only opens the dialog, i guess it doesn't support args..
Some documentation for this would be nice.