I am developing a tool to assist GIS Techs in the process of georeferencing thousands of scanned maps.
I need to:
1) add the .tiff to the map with a button click (done)
2) open the georeferencing toolbar automatically
The code below doesnt seem to do anything. I cannot get any tab /ribbon to activate with this code. Is there a different way of achieving this?
FrameworkApplication.ActivateTab("esri_mapping_georeference_GeoreferenceTab");
3) execute the command "esri_mapping_georeferenceing_StartSessionButton"
The code below does not seem to run. CanExecute is returning False. But, when I try different commands such as esri_mapping_georeference_MoveButton, Command.Execute doesn't do anything.
var commandId = @esri_mapping_georeferenceing_StartSessionButton;
// get the ICommand interface from the ArcGIS Pro Button
// using command's plug-in wrapper
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);
}
How do I programatically execute built in commands in the georeferencing area? I read a different post that says sometimes you may have to activate a parent item before the child is accessible. If that is true, how do I determine what the parents are?
4) After the user does the georeferencing, I want to read the data from the georeferencing tool window (such as rotation, origin coordinates, scale). Is this possible to hook into the built in tools to control them / read their data?
Thank you very much for any assistance. I am trying lots of things and reading all I can find but I am missing something as I can't get anything to run. New to Pro, familiar with ArcObjects and WPF.
Relevant daml ids:
Name: Selected map has an active georeferencing edit session.
ID: esri_mapping_SceneGeoreferenceCondition
Name: Close Georeference
ID: esri_mapping_georeference_CloseSessionButton
Name: Elevate To Ground
ID: esri_mapping_georeference_ElevateToGroundButton
Name: Import
ID: esri_mapping_georeference_LoadControlPointsButton
Name: Move To Display
ID: esri_mapping_georeference_MoveToDisplayButton
Name: Reset
ID: esri_mapping_georeference_ResetButton
Name: Save As New
ID: esri_mapping_georeference_SaveAsButton
Name: Save
ID: esri_mapping_georeference_SaveButton
Name: Save To Workspace
ID: esri_mapping_georeference_SaveToWorkspaceButton
Name: Georeference
ID: esri_mapping_georeferenceing_StartSessionButton
Name: Move
ID: esri_mapping_georeference_MoveButton
Name: Rotate
ID: esri_mapping_georeference_RotateButton
Name: Scale
ID: esri_mapping_georeference_ScaleButton