We are working on a project using ArcGIS Pro SDK. The following is the problem statement.
User wishes to enable two map tools at same time, for example if user clicks on first tool, then another tool should be enabled as shown in the attached screenshot.
This is already implemented in ArcMap and it is working.
Your inputs/ideas are most appreciated.
Pic.1 ArcGISPro
User selected "Modify Annotation Tool”, now user wants to enable "Point Rotate Tool" automatically
Pic.2 ArcMap
Working functionality in ArcMap.
Hi,
Create your own conditions in daml following:
Thank you for replying,
We tried your suggestion but it is not fulfill our requirement.
There's an example of a custom condition and the daml configuration at the bottom of the following thread:
You can try to change the image of button to indicate that it is active/inactive based on the required condition(for Appearance purpose and in the backend you have to implement your logic to accomplish the functionality) .
Code snippet is given below for your reference.
internal class btnViewConfig : Button
{
protected override void OnClick()
{
this.SmallImage = new BitmapImage(new Uri("pack://application:,,,/YourAssemblyName;component/Resources/Activated.png"));
this.LargeImage = new BitmapImage(new Uri("pack://application:,,,/YourAssemblyName;component/Resources/Activated.png"));
}
}
Neither ArcGIS Pro nor the Pro SDK support activating two tools at the same time. If you write your own tools you can 're-use' a tool from OnSketchComplete of another tool. I attached a sample project to demonstrate this pattern. The attached add-in contains two tools: the 'Line Anno' tool which allows to draw a line and places an annotation feature and the 'Draw line' tool that creates line feature and then uses the 'Line Anno' tool code to create the annotation feature attached to the line.
When i use the 'Line Anno' tool the add-in places an annotation feature:
then I use the 'Draw Line' tool to draw a line, which is used to create a new line feature, but once the line feature has been created the code of the 'Line Anno' is called with the same geometry:
I attached the SampleAnno.ppkx to test the add-in and all source code.
Thank you for replying wolf