Esri / local-government-desktop-addins

A series of ArcGIS Desktop Add-ins used in the ArcGIS for Local Government editing maps.
Apache License 2.0
61 stars 57 forks source link

AA - set_measures behavior #237

Open pLeBlanc93 opened 7 years ago

pLeBlanc93 commented 7 years ago

Per this question on GeoNet, it's unclear what the SET_MEASURES method does. Looking at the source code, it just interpolates M values at all vertices. The documentation here refers to populating a field.

Is this method intended to be used only to recalculate M-values for vertices, i.e., the documentation needs to remove references storing field values?

MikeMillerGIS commented 7 years ago

help is wrong, only sets the measures on the feature.

 case "SET_MEASURES":
                                            try
                                            {
                                                AAState.WriteLine(A4LGSharedFunctions.Localizer.GetString("AttributeAssistantEditorMess_14ar") + "SET_MEASURES");
                                                if (inFeature != null)
                                                {
                                                    curve = inFeature.Shape as ICurve;
                                                    mseg = inFeature.Shape as IMSegmentation;
                                                    if (curve != null && mseg != null)
                                                        if (valData != null && valData != "" && valData.Substring(0, 1).ToUpper() == "P")
                                                            mseg.SetAndInterpolateMsBetween(0, 100);
                                                        else
                                                            mseg.SetAndInterpolateMsBetween(0, curve.Length);
                                                }

                                            }
                                            catch (Exception ex)
                                            {
                                                AAState.WriteLine(A4LGSharedFunctions.Localizer.GetString("AttributeAssistantEditorError_14a") + "SET_MEASURES: " + ex.ToString());
                                            }
                                            finally
                                            {
                                                AAState.WriteLine(A4LGSharedFunctions.Localizer.GetString("AttributeAssistantEditorMess_14as") + "SET_MEASURES");
                                            }
                                            break;
MikeMillerGIS commented 7 years ago

I think we should extend this method, Be easy to support EndField or StartField|EndField. If these fields exist, the values from these fields would be used for the start and end distances on SetAndInterpolateMsBetween method. I would guess only an hour of coding as these types of checks are in other methods, would just need to move them to this method

MikeMillerGIS commented 5 years ago

@Elena9170 can you fix this one while in there, just remove the text highlight below

image

ElenaFernandes commented 5 years ago

Removed and addressed in Pull request https://github.com/ArcGIS/arcgis-solutions-website/pull/7256/files

MikeMillerGIS commented 5 years ago

I did not see it in that PR

ElenaFernandes commented 5 years ago

Strange behavior with Github Desktop, it should be visible now.