This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IG > IGeometry4 Interface > IGeometry4.Changed Property (ArcObjects .NET 10.4 SDK) |
Indicates if a geometry has been changed (edited, projected, etc).
[Visual Basic .NET] Public Property Changed As Boolean
[C#] public bool Changed {get; set;}
[C++]
HRESULT get_Changed(
VARIANT_BOOL* isChanged
);
[C++]
HRESULT put_Changed(
VARIANT_BOOL isChanged
);
[C++]
Parameters isChanged [out, retval] isChanged is a parameter of type VARIANT_BOOL isChanged isChanged is a parameter of type VARIANT_BOOL
The Changed method returns whether or not the geometry has been modified. If the geometry always stays in memory that method only returns 'false' immediately after its creation. However if the shape came from disk the Changed method will return 'false' until de geometry is modified in memory.
//This example demonstrates how to use the Changed method
private void Changed_Example()
{
IEnvelope envelope=new EnvelopeClass();
envelope.PutCoords(0, 0, 20, 20);
ISegmentCollection segmentCollection=new PolygonClass();
segmentCollection.SetRectangle(envelope);
IGeometry4 geometry=segmentCollection as IGeometry4;
System.Windows.Forms.MessageBox.Show("Just after creation : " + geometry.Changed);
segmentCollection.SetRectangle(envelope);
System.Windows.Forms.MessageBox.Show("Just after modification : " + geometry.Changed);
}