AnsweredAssumed Answered

onRowChangeEvent Determine Geometry Change

Question asked by mjk5000 on Nov 1, 2017
Latest reply on Nov 2, 2017 by mjk5000

I cant seem to figure out how to determine if the Row Change was a geometry change only?  I need to know if the change that triggered this row change was an attribute change, or if someone just moved a vertices or something.  I have tried both of these in my onRowChangeEvent  and neither seem to work for both attribute only changes or geometry only changes.

 

int shapeIndex = args.Row.GetTable().GetDefinition().FindField("Shape");
bool shapeChanged = args.Row.HasValueChanged(shapeIndex);

 

bool shapeChanged2 = (Geometry)args.Row.GetOriginalValue(shapeIndex) != (Geometry)args.Row[shapeIndex];

 

        protected async void onRowChangeEvent(RowChangedEventArgs args)
        {
            //Polygon selectedLine = inspr["SHAPE"] as Polygon;
            int shapeIndex = args.Row.GetTable().GetDefinition().FindField("Shape");
           
            //These both seem to always return true even if it is a attribute only change
            bool shapeChanged = args.Row.HasValueChanged(shapeIndex);
            bool shapeChanged2 = (Geometry)args.Row.GetOriginalValue(shapeIndex) != (Geometry)args.Row[shapeIndex];
        }

Outcomes