This document is archived and information here might be outdated.  Recommended version.


ITopologyGraph.SelectByGeometry Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (GeoDatabase)  

ITopologyGraph.SelectByGeometry Method

Selects nodes and/or edges that intersect the specified geometry; whichElements is a bitwise combination of esriTopologyElement values.

[Visual Basic .NET]
Public Sub SelectByGeometry ( _
    ByVal whichElements As Integer, _
    ByVal selectHow As esriTopologySelectionResultEnum, _
    ByVal Geometry As IGeometry _
)
[C#]
public void SelectByGeometry (
    int whichElements,
    esriTopologySelectionResultEnum selectHow,
    IGeometry Geometry
);
[C++]
HRESULT SelectByGeometry(
  long whichElements,
  esriTopologySelectionResultEnum selectHow,
  IGeometry* Geometry
);
[C++]

Parameters whichElements whichElements is a parameter of type long selectHow
selectHow is a parameter of type esriTopologySelectionResultEnum Geometry
Geometry is a parameter of type IGeometry

Product Availability

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

Description

The ITopologyGraph::SelectByGeometry method allow to modify the current set of selected TopologyElement part of the TopologyGraph using an input geometry. The selection behavior is determined by the esriTopologySelectionResultEnum parameter.

Remarks

Only geometry types that implement the IRelationalOperator interface are valid for the pGeometry parameter. This method uses the IRelationalOperator::Disjoint (opposite of intersect) to determine if TopologyElements have to be selected. Therefore this method may select TopologyEdges that are not completely overlapping with the input geometry if the input is of type polygon or polyline. Using a point as the input geometry is a valid way to select only one edge.

whichElements is a bitwise combination of esriTopologyElement values.

If a Topology Element selected programmatically has to be moved using the Topology Edit Tool, the Selection Anchor has to be set to a valid location on the topology element.

[C#]

For example, to move a node the selection anchor can be set to the location of the node.

ESRI.ArcGIS.Display.IAnchorPoint anchorPoint=editor.SelectionAnchor;
anchorPoint.MoveTo(topologyNode.Geometry, activeDisplay);

See Also

ITopologyGraph Interface