ArcObjects Library Reference (GeoDatabase)  

ITopology.ValidateTopology Method

Validate the specified area in the topology.

[Visual Basic .NET]
Public Function ValidateTopology ( _
    ByVal areaToValidate As IEnvelope _
) As IEnvelope
[C#]
public IEnvelope ValidateTopology (
    IEnvelope areaToValidate
);
[C++]
HRESULT ValidateTopology(
  IEnvelope* areaToValidate,
  IEnvelope** affectedArea
);
[C++]

Parameters

areaToValidate [in]

  areaToValidate is a parameter of type IEnvelope

affectedArea [out, retval]

  affectedArea is a parameter of type IEnvelope

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

ValidateTopology validates the topology in the area specified by the areaToValidate envelope and returns the envelope of the validated area .  If an empty envelope is supplied, ValidateTopology will return an empty validated area. If an envelope is supplied which does not intersect or contain a dirty area, an empty envelope is returned.

Before validating a given area, use a polygon object to verify a Dirty Area is present at the given location.  This can be done using the ITopology::DirtyArea property.  The envelope of the polygon can then be passed into ValidateTopology.

Errors Returned

FDO_E_EDIT_OPERATION_REQUIRED

When ValidateTopology is called on a versioned topology from within an edit session and without an edit operation or on a Topology in a file or personal geodatabase from within an edit session.

If nothing is supplied for areaToValidate, an error is returned.

Remarks

ValidateTopology can be performed outside of an edit session on Topologies within Personal or File Geodatabases or on Topologies within ArcSDE Geodatabases which have not been registered as versioned.  Once the Topology is registered as versioned, ValidateTopology must be performed within an edit session.  When performed within an edit session, ValidateTopology must also be bracketed within an edit operation.

It is not necessary to validate the entire dirty area of the topology.  Subsets of the dirty area can be specified, resulting in a partial validation. When a partial validation occurs, the original dirty area is clipped by the envelope that was supplied for the validation.

ValidateTopology validates the dirty area of the topology in the area specified by the areaToValidate envelope.  The validate process evaluates all the rules and produces any topology errors corresponding to areas in which a rule has been violated.  The ValidateTopology function returns the envelope of the validated area.  If an empty envelope is supplied, ValidateTopology will return an empty validated area.  ValidateTopology can be performed outside of an edit session on topologies within Personal Geodatabases or on topologies within ArcSDE Geodatabases that have not been registered as versioned.  Once a topology is registered as versioned, ValidateTopology must be performed within an edit session and bracketed within an edit operation.  The IWorkspaceEdit or IEditor interfaces can be used to manage edit sessions and edit operations.

An entire topology can be validated by supplying the envelope of the extent of the topology.

By supplying a polygon object to the ITopology::DirtyArea property, the dirty area at a particular location can be returned.  The envelope of the returned dirty area polygon can then be passed into ValidateTopology.

The OnCreate, OnDelete or OnChange events are not fired during a Topology Validation.  The OnCreate and OnDelete events are not applicable since a Validate does not create or delete features.  The OnChange event is not fired for performance reasons as a large number of features may be changed during a Validate.  In addition, features may be changed many times.

See Also

ITopology Interface