Esri / visibility-addin-dotnet

ArcGIS Add-in provides the capability to quickly do line of sight analyses.
Apache License 2.0
14 stars 19 forks source link

Labels for Visible Observers does not show up #107

Closed lfunkhouser closed 7 years ago

lfunkhouser commented 7 years ago

From @topowright on December 8, 2016 7:30

When running the visibility LOS tool in the ArcGIS Pro add-in there should be a label showing how many observers can see a target. Currently This does not show up

Expected Behavior

I would expect any target that is green be numbered with at least one

Current Behavior

No label is being generated

Possible Solution

Unclear. This works in ArcGIS Pro 1.3 , but not in ArcGIS Pro 1.4

Steps to Reproduce (for bugs)

1.Choose at least one target 2.Choose multiple observers (make sure the observer can see the target) 3.Run the LOS tool 4.

Context

Your Environment

Using ArcGIS Pro 1.4 - alpha

Copied from original issue: Esri/military-tools-for-arcgis#76

lfunkhouser commented 7 years ago

From @topowright on December 8, 2016 22:28

@nfeuerstein adding you for awareness

lfunkhouser commented 7 years ago

From @dhagens on December 13, 2016 17:11

The following are my findings for the labeling in Pro 1.4

In Pro 1.3, the label expression engine is either defaulted to VBScript or is smart enough to know what kind of expression is being used and sets it automatically. In Pro 1.4, the expression engine defaults to Arcade. By programatically setting the expression engine in the code to VBScript, the following label expression does validate correctly:

                             Function FindLabel ( [NumOfObservers] )
                                   If (CInt([NumOfObservers])>0) Then
                                       FindLabel = [NumOfObservers]
                                   else
                                       FindLabel = ""
                                   End If
                                End Function

Unfortunately the label is never displayed. I tried modifying the expression several different ways but cannot get the label to show up. I also tried exporting the working expression in Pro 1.3 and importing the that expression in Pro 1.4. Again, the expression validates fine, but does not display a label.

lfunkhouser commented 7 years ago

From @dfoll on December 13, 2016 18:41

@topowright check out @mfunk latest comments on https://github.com/Esri/military-tools-geoprocessing-toolbox/issues/159 and https://github.com/Esri/military-tools-geoprocessing-toolbox/issues/157

lfunkhouser commented 7 years ago

From @topowright on December 13, 2016 19:14

@mfunk @dfoll I just spoke to core and this is a major issue for them that they are going to get started on now. The issues that we found are as follows:

  1. The labeling tool is not setting the language to the type that is being passed. For our tool that should be automatically set to VisualBasic, but instead it is staying on Arcade, which i think is default.

  2. The location of the label is not being set even though the tool passes the CenterPoint parameter.

dhagens commented 7 years ago

@elinz, this is ready to be verified if you have some availability.

elinz commented 7 years ago

@dhagens Testing right now in Pro 1.4 with addin built on 1.4 SDK. Labeling is now working. Installing latest 1.4 daily build and will retest.

elinz commented 7 years ago

@dhagens Tested on latest Pro 1.4 build (7187) with addin built on 1.4 SDK. Labeling is working, example, shown below: image

Closing issue.