com.esri.arcgis.carto
Interface IGraphicSnapEnvironment2

All Superinterfaces:
Serializable
All Known Implementing Classes:
GraphicSnapEnvironment, PageLayout

public interface IGraphicSnapEnvironment2
extends Serializable

Provides access to members that control the Collection of snap agents used for snapping graphics.

Product Availability

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


Method Summary
 void addSnapAgent(IGraphicSnap snapAgent)
          Add a new snap agent to the environment.
 void clearSnapAgents()
          Remove all snap agents.
 void deleteSnapAgent(IGraphicSnap snapAgent)
          Remove specified snap agent from the environment.
 IGraphicSnap getSnapAgent(int index)
          The snap agent at the specified index.
 int getSnapAgentCount()
          The number of snap agents.
 IArray getSnapAgentOrder()
          An array of IDs indicating how agents should be ordered.
 double getSnapTolerance()
          The snap tolerance in page units.
 void setSnapAgentOrder(IArray guids)
          An array of IDs indicating how agents should be ordered.
 void setSnapTolerance(double tol)
          The snap tolerance in page units.
 void snapShape(IGeometry shape)
          Snap the shape using the agents in the environment.
 void snapShapeEx(IElement pElement, IGeometry shape)
          Snap the shape using the agents in the environment.
 

Method Detail

snapShape

void snapShape(IGeometry shape)
               throws IOException,
                      AutomationException
Snap the shape using the agents in the environment.

Product Availability

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

Parameters:
shape - A reference to a com.esri.arcgis.geometry.IGeometry (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSnapTolerance

double getSnapTolerance()
                        throws IOException,
                               AutomationException
The snap tolerance in page units.

Product Availability

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

Returns:
The tol
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSnapTolerance

void setSnapTolerance(double tol)
                      throws IOException,
                             AutomationException
The snap tolerance in page units.

Product Availability

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

Parameters:
tol - The tol (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSnapAgentOrder

void setSnapAgentOrder(IArray guids)
                       throws IOException,
                              AutomationException
An array of IDs indicating how agents should be ordered.

Product Availability

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

Parameters:
guids - A reference to a com.esri.arcgis.system.IArray (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSnapAgentOrder

IArray getSnapAgentOrder()
                         throws IOException,
                                AutomationException
An array of IDs indicating how agents should be ordered.

Product Availability

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

Returns:
A reference to a com.esri.arcgis.system.IArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSnapAgentCount

int getSnapAgentCount()
                      throws IOException,
                             AutomationException
The number of snap agents.

Product Availability

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

Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSnapAgent

IGraphicSnap getSnapAgent(int index)
                          throws IOException,
                                 AutomationException
The snap agent at the specified index. The index argument is zero based.

Product Availability

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

Parameters:
index - The index (in)
Returns:
A reference to a com.esri.arcgis.carto.IGraphicSnap
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

clearSnapAgents

void clearSnapAgents()
                     throws IOException,
                            AutomationException
Remove all snap agents.

Product Availability

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

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addSnapAgent

void addSnapAgent(IGraphicSnap snapAgent)
                  throws IOException,
                         AutomationException
Add a new snap agent to the environment.

Product Availability

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

Parameters:
snapAgent - A reference to a com.esri.arcgis.carto.IGraphicSnap (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deleteSnapAgent

void deleteSnapAgent(IGraphicSnap snapAgent)
                     throws IOException,
                            AutomationException
Remove specified snap agent from the environment.

Product Availability

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

Parameters:
snapAgent - A reference to a com.esri.arcgis.carto.IGraphicSnap (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

snapShapeEx

void snapShapeEx(IElement pElement,
                 IGeometry shape)
                 throws IOException,
                        AutomationException
Snap the shape using the agents in the environment.

Product Availability

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

Parameters:
pElement - A reference to a com.esri.arcgis.carto.IElement (in)
shape - A reference to a com.esri.arcgis.geometry.IGeometry (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.