Esri / military-tools-desktop-addins

Military Tools for ArcGIS is a collection of mission-focused enhancements to simplify defense and intelligence workflows in ArcGIS.
Apache License 2.0
26 stars 14 forks source link

Add a Military Tools Button to the Analysis Ribbon #66

Closed topowright-zz closed 5 years ago

topowright-zz commented 6 years ago

Currently we have a python package and conda package for Military Tools. We give users the ability to install these tools as a system tool; however, we would like to create a button the analysis ribbon that gives our users the ability to find these tools in a custom button dialog drop down menu.

Current State

The gp tools live in the following repo: https://github.com/Esri/military-tools-geoprocessing-toolbox

Crime Analysis addin is a good example of already doing this: https://solutions.arcgis.com/local-government/help/crime-analysis/ image when you hover over the button there is a tooltip with short description. Once you click the button you are presented with a list of the gp tools grouped by toolset in a gray header. The toolset does not need a description or icon, just name. Each tool has a name, icon, and short description. Icons are here. Toolsets/tools/descriptions provided here

This (Crime Analysis) must be downloaded from the Solutions Deployment Tool: https://solutions.arcgis.com/shared/help/deployment-tool/

These tools are not accessible in a way that takes advantage of the ArcGIS Pro custom ribbons

Expected Behavior

Current Behavior

Steps to Reproduce (for bugs)

Your Environment

This will only be done for ArcGIS Pro

topowright-zz commented 5 years ago

Here are the icons for the drop down menu. PNGs.zip

dfoll commented 5 years ago

Tooltip for Military Tools button should be "Military Tools A collection of tools for coordinate conversion, distance and direction calculations, creating gridded reference graphics, visibility analysis, and the creation of military symbols."

Toolset Tool Description
Conversion
Convert Coordinates Converts source coordinates in a table to multiple coordinate formats.
Table To 2-Point Line Creates a line feature from start and end point coordinates.
Table To Ellipse Creates ellipse features from tabular coordinates and input data values
Table To Line of Bearing Creates lines of bearing from tabular coordinates.
Table To Point Creates point features from tabular coordinates.
Table to Polygon Creates polygon features from tabular coordinates.
Table to Polyline Creates polyline features from tabular coordinates.
Distance and Direction
Range Rings From Interval Creates concentric circles from a center, with a number of rings, and the distance between rings.
Range Rings From Minimum and Maximum Creates two concentric circles from a center, depicting a minimum range and a maximum range.
Range Rings From Minimum and Maximum Table Creates two concentric circles from a center, depicting a minimum range and a maximum range from a table.
Gridded Reference Graphic
Create GRG From Area Creates a Gridded Reference Graphic (GRG) over a specified area, with a custom size.
Create GRG From Point Creates a Gridded Reference Graphic (GRG) based on a point, with a custom size.
Create Reference System GRG From Area Creates a Gridded Reference Graphic (GRG) based on Military Grid Reference System (MGRS) or United States National Grid (USNG) reference grids.
Number Features Adds numbers to a field in an existing feature class.
Visibility
Find Local Peaks Finds the highest local peaks within the defined area.
Highest Points Finds the highest point (or points) within a defined area.
Linear Line of Sight Creates lines of sight between observers and targets.
Lowest Points Finds the lowest point (or points) within a defined area.
Radial Line of Sight Shows the areas visible and not visible to an observer at a specified distance and viewing angle.
Radial Line of Sight and Range Shows view range and areas visible and not visible to an observer at a specified distance and viewing angle.
dfoll commented 5 years ago

@lfunkhouser we are trying to trouble shoot why we are seeing issues with making this work on Pro2.1. Can we get sai added here so that he can post the code he has so far in a branch to get some assistance in troubleshooting this?

dfoll commented 5 years ago

@CTLocalGovTeam has provided their code here. The summary of the problem is that they have provided a working solution for Pro 2.2 but it fails in Pro 2.1. They have asked that we reach out to core to see if we can get any assistance for why this might be.

dfoll commented 5 years ago

I tried doing a build so we could start investigating this and maybe get to the bottom of it. This is what happens.

Note that I am also building this from my own test branch in solutions-defense that I am trying to use to test this before merging.

csmoore commented 5 years ago

@saip @CTLocalGovTeam - for @dfoll 's build issue - it looks like some of the files are missing from this folder: https://github.com/Esri/military-tools-desktop-addins/tree/cybertech-dev/tools/src/militarytools/esri/toolboxes

I believe it should look the same as this folder: https://github.com/Esri/military-tools-geoprocessing-toolbox/tree/dev/pythonpackage/militarytools/esri/toolboxes

Not sure if this has been discussed, but would it be possible to get the python/toolbox files directly from the repo : https://github.com/Esri/military-tools-geoprocessing-toolbox - either by requiring the repo be present at the same root folder (like is done with the other addins) or by creating a subproject - instead of forking another copy files.


Here is the error output - note there is also a warning (on first line) about "processor mismatch" that should probably also be addressed:

C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "c:\jProd\workspace\MT_Pipeline\coordinate-conversion-addin-dotnet\source\CoordinateConversion\ProAppCoordConversionModule\bin\Release\CoordinateConversion.dll", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. [c:\jProd\workspace\MT_Pipeline\military-tools-desktop-addins\source\MilitaryToolsForArcGISPro\MilitaryToolsForArcGISPro.csproj]
C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(711,5): error BG1002: File '..\..\tools\src\militarytools\esri\toolboxes\Military Tools.AddLinearLineOfSightFields.pyt.xml' cannot be found. [c:\jProd\workspace\MT_Pipeline\military-tools-desktop-addins\source\MilitaryToolsForArcGISPro\MilitaryToolsForArcGISPro.csproj]
C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(711,5): error BG1002: File '..\..\tools\src\militarytools\esri\toolboxes\Military Tools.AddRadialLineOfSightObserverFields.pyt.xml' cannot be found. [c:\jProd\workspace\MT_Pipeline\military-tools-desktop-addins\source\MilitaryToolsForArcGISPro\MilitaryToolsForArcGISPro.csproj]
C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(711,5): error BG1002: File '..\..\tools\src\militarytools\esri\toolboxes\Military Tools.ConvertCoordinates.pyt.xml' cannot be found. [c:\jProd\workspace\MT_Pipeline\military-tools-desktop-addins\source\MilitaryToolsForArcGISPro\MilitaryToolsForArcGISPro.csproj]
C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(711,5): error BG1002: File '..\..\tools\src\militarytools\esri\toolboxes\Military Tools.CreateGRGFromArea.pyt.xml' cannot be found. [c:\jProd\workspace\MT_Pipeline\military-tools-desktop-addins\source\MilitaryToolsForArcGISPro\MilitaryToolsForArcGISPro.csproj]
C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(711,5): error BG1002: File '..\..\tools\src\militarytools\esri\toolboxes\Military Tools.CreateGRGFromPoint.pyt.xml' cannot be found. [c:\jProd\workspace\MT_Pipeline\military-tools-desktop-addins\source\MilitaryToolsForArcGISPro\MilitaryToolsForArcGISPro.csproj]
C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(711,5): error BG1002: File '..\..\tools\src\militarytools\esri\toolboxes\Military Tools.CreateReferenceSystemGRGFromArea.pyt.xml' cannot be found. [c:\jProd\workspace\MT_Pipeline\military-tools-desktop-addins\source\MilitaryToolsForArcGISPro\MilitaryToolsForArcGISPro.csproj]
C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(711,5): error BG1002: File '..\..\tools\src\militarytools\esri\toolboxes\Military Tools.FindLocalPeaks.pyt.xml' cannot be found. [c:\jProd\workspace\MT_Pipeline\military-tools-desktop-addins\source\MilitaryToolsForArcGISPro\MilitaryToolsForArcGISPro.csproj]
C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(711,5): error BG1002: File '..\..\tools\src\militarytools\esri\toolboxes\Military Tools.HighestPoints.pyt.xml' cannot be found. [c:\jProd\workspace\MT_Pipeline\military-tools-desktop-addins\source\MilitaryToolsForArcGISPro\MilitaryToolsForArcGISPro.csproj]
C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(711,5): error BG1002: File '..\..\tools\src\militarytools\esri\toolboxes\Military Tools.LinearLineOfSight.pyt.xml' cannot be found. [c:\jProd\workspace\MT_Pipeline\military-tools-desktop-addins\source\MilitaryToolsForArcGISPro\MilitaryToolsForArcGISPro.csproj]
C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(711,5): error BG1002: File '..\..\tools\src\militarytools\esri\toolboxes\Military Tools.LowestPoints.pyt.xml' cannot be found. [c:\jProd\workspace\MT_Pipeline\military-tools-desktop-addins\source\MilitaryToolsForArcGISPro\MilitaryToolsForArcGISPro.csproj]
C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(711,5): error BG1002: File '..\..\tools\src\militarytools\esri\toolboxes\Military Tools.pyt.xml' cannot be found. [c:\jProd\workspace\MT_Pipeline\military-tools-desktop-addins\source\MilitaryToolsForArcGISPro\MilitaryToolsForArcGISPro.csproj]
C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(711,5): error BG1002: File '..\..\tools\src\militarytools\esri\toolboxes\Military Tools.RadialLineOfSight.pyt.xml' cannot be found. [c:\jProd\workspace\MT_Pipeline\military-tools-desktop-addins\source\MilitaryToolsForArcGISPro\MilitaryToolsForArcGISPro.csproj]
C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(711,5): error BG1002: File '..\..\tools\src\militarytools\esri\toolboxes\Military Tools.RadialLineOfSightAndRange.pyt.xml' cannot be found. [c:\jProd\workspace\MT_Pipeline\military-tools-desktop-addins\source\MilitaryToolsForArcGISPro\MilitaryToolsForArcGISPro.csproj]
C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(711,5): error BG1002: File '..\..\tools\src\militarytools\esri\toolboxes\Military Tools.RangeRingFromMinimumAndMaximum.pyt.xml' cannot be found. [c:\jProd\workspace\MT_Pipeline\military-tools-desktop-addins\source\MilitaryToolsForArcGISPro\MilitaryToolsForArcGISPro.csproj]
C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(711,5): error BG1002: File '..\..\tools\src\militarytools\esri\toolboxes\Military Tools.RangeRingsFromInterval.pyt.xml' cannot be found. [c:\jProd\workspace\MT_Pipeline\military-tools-desktop-addins\source\MilitaryToolsForArcGISPro\MilitaryToolsForArcGISPro.csproj]
C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(711,5): error BG1002: File '..\..\tools\src\militarytools\esri\toolboxes\Military Tools.RangeRingsFromMinAndMaxTable.pyt.xml' cannot be found. [c:\jProd\workspace\MT_Pipeline\military-tools-desktop-addins\source\MilitaryToolsForArcGISPro\MilitaryToolsForArcGISPro.csproj]
C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(711,5): error BG1002: File '..\..\tools\src\militarytools\esri\toolboxes\Military Tools.TableTo2PointLine.pyt.xml' cannot be found. [c:\jProd\workspace\MT_Pipeline\military-tools-desktop-addins\source\MilitaryToolsForArcGISPro\MilitaryToolsForArcGISPro.csproj]
C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(711,5): error BG1002: File '..\..\tools\src\militarytools\esri\toolboxes\Military Tools.TableToEllipse.pyt.xml' cannot be found. [c:\jProd\workspace\MT_Pipeline\military-tools-desktop-addins\source\MilitaryToolsForArcGISPro\MilitaryToolsForArcGISPro.csproj]
C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(711,5): error BG1002: File '..\..\tools\src\militarytools\esri\toolboxes\Military Tools.TableToLineOfBearing.pyt.xml' cannot be found. [c:\jProd\workspace\MT_Pipeline\military-tools-desktop-addins\source\MilitaryToolsForArcGISPro\MilitaryToolsForArcGISPro.csproj]
C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(711,5): error BG1002: File '..\..\tools\src\militarytools\esri\toolboxes\Military Tools.TableToPoint.pyt.xml' cannot be found. [c:\jProd\workspace\MT_Pipeline\military-tools-desktop-addins\source\MilitaryToolsForArcGISPro\MilitaryToolsForArcGISPro.csproj]
C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(711,5): error BG1002: File '..\..\tools\src\militarytools\esri\toolboxes\Military Tools.TableToPolygon.pyt.xml' cannot be found. [c:\jProd\workspace\MT_Pipeline\military-tools-desktop-addins\source\MilitaryToolsForArcGISPro\MilitaryToolsForArcGISPro.csproj]
C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(711,5): error BG1002: File '..\..\tools\src\militarytools\esri\toolboxes\Military Tools.TableToPolyline.pyt.xml' cannot be found. [c:\jProd\workspace\MT_Pipeline\military-tools-desktop-addins\source\MilitaryToolsForArcGISPro\MilitaryToolsForArcGISPro.csproj]
C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(711,5): error BG1002: File '..\..\tools\src\militarytools\esri\toolboxes\Military_Tools.pyt.xml' cannot be found. [c:\jProd\workspace\MT_Pipeline\military-tools-desktop-addins\source\MilitaryToolsForArcGISPro\MilitaryToolsForArcGISPro.csproj]
C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(711,5): error BG1002: File '..\..\tools\src\militarytools\esri\toolboxes\Military_Tools.TableToPolygon.pyt.xml' cannot be found. [c:\jProd\workspace\MT_Pipeline\military-tools-desktop-addins\source\MilitaryToolsForArcGISPro\MilitaryToolsForArcGISPro.csproj]

Done Building Project "c:\jProd\workspace\MT_Pipeline\military-tools-desktop-addins\source\MilitaryToolsForArcGISPro\MilitaryToolsForArcGISPro.csproj" (default targets) -- FAILED.

Done Building Project "c:\jProd\workspace\MT_Pipeline\military-tools-desktop-addins\source\MilitaryToolsForArcGISPro\MilitaryToolsForArcGISPro.sln" (default targets) -- FAILED.

Build FAILED.
saip commented 5 years ago

@csmoore Thanks for sharing the info. @dfoll The xmls were auto ignored by the Git source control. We have added them back now to cybertech-dev branch.

We have not yet discussed regarding the inclusion of the script files at root folder directly from the repo. I believe that would be good rather than creating the subproject, as that is how we are doing this for other addins of military tools. Please suggest.

dfoll commented 5 years ago

build_errors.txt

csmoore commented 5 years ago

@saip -working with @dfoll - we got a little further in the build.

Fixed these issues:

  1. Jenkins issue with renaming repo: https://github.com/Esri/military-symbology
  2. Build issue with C# 6 syntax https://github.com/Esri/military-tools-desktop-addins/pull/79

But there seems to be a remaining issue in script:

  1. Build script is failing on this line: https://github.com/Esri/military-tools-desktop-addins/blob/cybertech-dev/tools/src/recipe/ca-conda-build.bat#L5 - because it cannot find conda-build in folder: C:\Program Files\ArcGIS\Pro\bin\Python\Scripts a. Is this something that has been added to the default Pro configuration and can we get a copy?
csmoore commented 5 years ago

@dfoll @saip - got a little further by installing the conda-build dependency mentioned above with steps:

  1. Go to: C:\Program Files\ArcGIS\Pro\bin\Python\Scripts
  2. Run proenv.bat As Administrator
  3. activate root
  4. conda install conda-build

But now getting an error on step: python: can't open file 'setup.py': [Errno 2] No such file or directory - Error Log - CondaError.txt

dfoll commented 5 years ago

@saip we have finished reorganizing the files in https://github.com/Esri/military-tools-geoprocessing-toolbox you can now update your code to pull from here for the .pyt. @csmoore also added PR #81 to add the additional repo to clone.

dfoll commented 5 years ago

Info for the team

This is a conversation @saip and I had. I have not built from his branch yet, but you can see the functionality described by looking at crime analysis and ready to use tools. I have told @saip that we do not need to maintain highlighting as crime analysis does, as ready to use tools does not do it, and I do not understand what value it would have. please respond here if you disagree

[‎11/‎16/‎2018 6:31 AM] Sai Phaneendra:
Ok, while testing this morning I came across a behavior with military tools button which I want to confirm You can see the behavior I am about to talk with Crime analysis button and ready to use tools button in analysis tab [‎11/‎16/‎2018 6:32 AM] Sai Phaneendra:
Do we need to keep selected item highlighted in the list of tools in the MT gallery dropdown Crime analysis does and Ready to use tools does not [‎11/‎16/‎2018 6:34 AM] Sai Phaneendra:
If we don't want to maintain selection, it's fine. If we want selection to be maintained, then we see a bug with crime analysis [‎11/‎16/‎2018 6:35 AM] Sai Phaneendra:
The selection stays on even a tool from another toolbox is selected from analysis tab [‎11/‎16/‎2018 6:35 AM]
you're talking about ...

  1. open the button
  2. click a tool
  3. gp tool opens
  4. click crime analysis again
  5. button expands
  6. previous tool is still highlighted ??? [‎11/‎16/‎2018 6:35 AM] Sai Phaneendra:
    Yes [‎11/‎16/‎2018 6:36 AM] Sai Phaneendra:
    But, even after selecting a tool from say ready to use tools is selected [‎11/‎16/‎2018 6:36 AM] Sai Phaneendra:
    or we close the geoprocessing dock pane [‎11/‎16/‎2018 6:36 AM] Sai Phaneendra:
    it is still highlighted I tried finding an event that would let me know the tools changed event or something similar but I could not find [‎11/‎16/‎2018 6:37 AM]
    yes, i think i see what you are talking about [‎11/‎16/‎2018 6:37 AM]
    i think it does not need to stay highlighted [‎11/‎16/‎2018 6:38 AM]
    i will ask ryan what his logic is for that, but right now, i don't see what value it adds [‎11/‎16/‎2018 6:38 AM] Sai Phaneendra:
    It would never be highlighted, same as the behavior as ready to use tools [‎11/‎16/‎2018 6:38 AM] Sai Phaneendra:
    Is this ok, if I deliver what I mentioned in the above statement [‎11/‎16/‎2018 6:38 AM] Sai Phaneendra:
    ? [‎11/‎16/‎2018 6:38 AM]
    yes, deliver that if i find that it needs to be highlighted i will get back to you and let you know [‎11/‎16/‎2018 6:39 AM]
    thanks
dfoll commented 5 years ago

This was merged. Testing happened before merge from CT-branch. We saw some symbology issues (391 and #85) that were uncovered during testing but not something that was introduced with this branch. Would like to see this tested one more time from the version that builds from dev (167 or later) before it is closed.

dfoll commented 5 years ago

@saip what would the level of effort be to move the Military Tools button to the Tools section of the Analysis ribbon before we do our final QC-Verify and close this out?

BobBooth commented 5 years ago

In build 170, the Table to 2 Point Line tool has missing spaces in the name (3.3.0.170). It says "TableTo 2 PointLine" The other tool names and descriptions look good.

saip commented 5 years ago

@dfoll @BobBooth Corrected the tool name Table To 2-Point Line and moved the Military Tools button to the Tools section of the Analysis ribbon.

Changes are included in PR #87

BobBooth commented 5 years ago

Added to the What's new section for this release in the Resources tab: "The Military Tools geoprocessing tools are available on the ArcGIS Pro Analysis ribbon, from the Military Tools button."

Added to the Get Started page in the Install the toolbox for ArcGIS Pro section, an Esri StepInfo tag after step 5 Note: When you install the Military Tools for ArcGIS add-in for ArcGIS Pro, you get access to these geoprocessing tools from the Military Tools button on the Analysis ribbon.

Added to Defense What's New page: Added Military Tools button to ArcGIS Pro Analysis ribbon to provide access to the Military Tools geoprocessing tools. (PR 7336 - @dfoll please review and merge)

BobBooth commented 5 years ago

With the latest build, I confirm that the Military Tools button has been moved into the general "Tools" section of the Analysis ribbon, beside Network Analysis, Geostatistical Wizard, Business Analyst. image and Table To 2-Point Line tool name has been fixed. image

BobBooth commented 5 years ago

Ran each of the tools once, with our test dataset, they all produced correct results.

BobBooth commented 5 years ago

Tested build 172 (from Dev) on Pro 2.1, no issues, except known issue about GRG from Point not running unless in Web Mercator (not related to this issue) and symbology of input points being generic blue "pin" symbols for most tools. image

Affected tools: GRG from Point Range Rings from Interval Range Rings from Min Max Range Rings from Min Max Table Linear Line of Sight (Observers, but not Targets) <- it might be useful to know why one works and the other does not Radial Line of Sight Radial Line of Sight and Range

BobBooth commented 5 years ago

Added issue https://github.com/Esri/military-tools-desktop-addins/issues/88 @dfoll @lfunkhouser

lfunkhouser commented 5 years ago

Input symbology is not as expected and a bug (logged as issue #88 ) needs to be addressed in order to be complete. Symbology of input points should not be generic blue "pin" symbols. @saip please work with @dfoll if further clarification is needed.
FYI: @CTLocalGovTeam

dfoll commented 5 years ago

88 and #85 have both been moved to done, 391 is a gp issue, not an issue with the work to add the button. @lfunkhouser can this be moved to done?

lfunkhouser commented 5 years ago

Yes. Moving to done. Thanks @BobBooth