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];
<SPAN class="keyword token">protected</SPAN> <SPAN class="keyword token">async</SPAN> <SPAN class="keyword token">void</SPAN> <SPAN class="token function">onRowChangeEvent</SPAN><SPAN class="punctuation token">(</SPAN>RowChangedEventArgs args<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="comment token">//Polygon selectedLine = inspr["SHAPE"] as Polygon;</SPAN>
<SPAN class="keyword token">int</SPAN> shapeIndex <SPAN class="operator token">=</SPAN> args<SPAN class="punctuation token">.</SPAN>Row<SPAN class="punctuation token">.</SPAN><SPAN class="token function">GetTable</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="token function">GetDefinition</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="token function">FindField</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"Shape"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">//These both seem to always return true even if it is a attribute only change</SPAN>
<SPAN class="keyword token">bool</SPAN> shapeChanged <SPAN class="operator token">=</SPAN> args<SPAN class="punctuation token">.</SPAN>Row<SPAN class="punctuation token">.</SPAN><SPAN class="token function">HasValueChanged</SPAN><SPAN class="punctuation token">(</SPAN>shapeIndex<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">bool</SPAN> shapeChanged2 <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">(</SPAN>Geometry<SPAN class="punctuation token">)</SPAN>args<SPAN class="punctuation token">.</SPAN>Row<SPAN class="punctuation token">.</SPAN><SPAN class="token function">GetOriginalValue</SPAN><SPAN class="punctuation token">(</SPAN>shapeIndex<SPAN class="punctuation token">)</SPAN> <SPAN class="operator token">!=</SPAN> <SPAN class="punctuation token">(</SPAN>Geometry<SPAN class="punctuation token">)</SPAN>args<SPAN class="punctuation token">.</SPAN>Row<SPAN class="punctuation token">[</SPAN>shapeIndex<SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>