com.esri.arcgis.schematic
Interface INgLink

All Superinterfaces:
Serializable
All Known Implementing Classes:
INgLinkProxy, NgLink, NgSubLink

public interface INgLink
extends Serializable

Provides access to members that control the graphic link.

Description

A link is an edge in a network graph. A link can go through a number of “link points” (also called intermediate points or vertices) that modify its path. It is represented either by a direct single line segment or by several line segments passing through one or several link points. The path between two link points may be graphically broken. All types of patterns may be drawn up along a link path that may also have any given line style (dot, dash, and so forth) and width. A link can have a direction: Arrows placed on its start and end points show this. If a link path goes through one or several nodes, it can be modified so as to allow the nodes to be automatically bypassed. The common properties of a link are stored and defined by its related link type.

Product Availability

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

See Also:
INgElement, ISchematicLink, INgSubLink

Method Summary
 void addPatternModel(INgPatternModel patternModel)
          Adds the pattern model 'patternModel' on the link.
 void addPoint(int numPoint, INgPoint point)
          Adds the link point 'numPoint' (that is, adds the vertex 'numpoint') at the position 'point' on the link.
 Object getCurrentEffect(int effect)
          Returns the current 'effValue' value for the effect 'effect' set for the link (see esriNgLinkEffect).
 INgPatternModels getCurrentPatternModels()
          List of the pattern models currently associated with the link.
 INgDiagram getDiagram()
          Diagram that contains the link.
 Object getEffect(int effect)
          Returns the effect 'effect' set for the link (see esriNgLinkEffect).
 INgElementType getElementType()
          Element type that implements the link.
 INgNode getFromNode()
          Origin node of the link.
 INgPoint getFromPoint(INgView view)
          Point position where the link connects its origin node, if a port is not specified for the connection.
 int getFromPort()
          Sequence number of the origin node port onto which the link snaps if a port is used for the connection.
 INgPoints getInitialPoints()
          List of the intermediate points that initially defined the link path.
 String getName()
          Name of the link.
 INgNodes getNodesOnLink()
          List of the nodes-on-link related to the link.
 int getNumberOfPoints()
          Number of intermediate points (vertices) along the link path.
 int getNumSegmentAtPoint(INgView view, INgPoint point)
          Returns the sequence number of the link's segment located at the position 'point' in the view 'view'.
 INgPatternModels getPatternModels()
          List of the pattern models directly associated with the link.
 INgPoints getPoints(INgView view)
          List of the intermediate points (vertices) that defines the link path (in the view 'view').
 INgLinks getSubLinks()
          List of the sub-links related to the link.
 INgNode getToNode()
          End node of the link.
 INgPoint getToPoint(INgView view)
          Point position where the link connects its end node, if a port is not specified for the connection.
 int getToPort()
          Sequence number of the end node port onto which the link snaps if a port is used for the connection.
 boolean isEffectSet(int effect)
          Indicates if the effect 'effect' related to the link is set (see esriNgLinkEffect).
 void movePoint(int numPoint, double x, double y, int moveMode)
          Moves the link point 'numPoint' at the relative or absolute (x,y) position.
 void removeAllPoints()
          Removes all of the link points (that is, all vertices) on the link.
 void removeEffect(int effect)
          Removes the effect or restores the default effect 'effect' set for the link (see esriNgLinkEffect).
 void removePatternModel(INgPatternModel patternModel)
          Removes the pattern model 'patternModel' assigned to the link.
 void removePoint(int numPoint)
          Removes the 'numPoint' link point (that is, removes the vertex 'numpoint') on the link.
 void restoreInitialPosition()
          Restores the link to its initially defined position (that is, with or without its initially defined vertices).
 void setEffect(int effect, Object effValue)
          Modifies the effect 'effect' set for the link (see esriNgLinkEffect).
 void setFromNode(INgNode pVal)
          Origin node of the link.
 void setFromPort(int pVal)
          Sequence number of the origin node port onto which the link snaps if a port is used for the connection.
 void setInitialPoints(INgPoints pVal)
          List of the intermediate points that initially defined the link path.
 void setToNode(INgNode pVal)
          End node of the link.
 void setToPort(int pVal)
          Sequence number of the end node port onto which the link snaps if a port is used for the connection.
 

Method Detail

getElementType

INgElementType getElementType()
                              throws IOException,
                                     AutomationException
Element type that implements the link.

Product Availability

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

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

getName

String getName()
               throws IOException,
                      AutomationException
Name of the link.

Description

This name has been defined when the link has been created:

- Either by triggering the INgDiagram CreateLink method or INgProjectEvents NameOfDigitLink event in the project code,

- Or, when its related link element type has been defined through ArcGIS Schematics Designer.

Product Availability

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

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

getDiagram

INgDiagram getDiagram()
                      throws IOException,
                             AutomationException
Diagram that contains the link.

Product Availability

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

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

getFromNode

INgNode getFromNode()
                    throws IOException,
                           AutomationException
Origin node of the link.

Product Availability

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

Returns:
A reference to a com.esri.arcgis.schematic.INgNode
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgLink.getFromPoint(com.esri.arcgis.schematic.INgView), INgLink.getFromPort(), INgLink.getToNode()

setFromNode

void setFromNode(INgNode pVal)
                 throws IOException,
                        AutomationException
Origin node of the link.

Product Availability

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

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

getToNode

INgNode getToNode()
                  throws IOException,
                         AutomationException
End node of the link.

Product Availability

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

Returns:
A reference to a com.esri.arcgis.schematic.INgNode
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgLink.getFromNode(), INgLink.getToPort(), INgLink.getToPoint(com.esri.arcgis.schematic.INgView)

setToNode

void setToNode(INgNode pVal)
               throws IOException,
                      AutomationException
End node of the link.

Product Availability

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

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

getFromPort

int getFromPort()
                throws IOException,
                       AutomationException
Sequence number of the origin node port onto which the link snaps if a port is used for the connection.

Product Availability

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

Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgLink.getFromPoint(com.esri.arcgis.schematic.INgView), INgLink.getFromNode(), INgLink.getToPort()

setFromPort

void setFromPort(int pVal)
                 throws IOException,
                        AutomationException
Sequence number of the origin node port onto which the link snaps if a port is used for the connection.

Product Availability

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

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

getToPort

int getToPort()
              throws IOException,
                     AutomationException
Sequence number of the end node port onto which the link snaps if a port is used for the connection.

Product Availability

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

Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgLink.getFromPort(), INgLink.getToNode(), INgLink.getToPoint(com.esri.arcgis.schematic.INgView)

setToPort

void setToPort(int pVal)
               throws IOException,
                      AutomationException
Sequence number of the end node port onto which the link snaps if a port is used for the connection.

Product Availability

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

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

getPoints

INgPoints getPoints(INgView view)
                    throws IOException,
                           AutomationException
List of the intermediate points (vertices) that defines the link path (in the view 'view').

Product Availability

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

Parameters:
view - A reference to a com.esri.arcgis.schematic.INgView (in, optional, pass 0 if not required)
Returns:
A reference to a com.esri.arcgis.schematic.INgPoints
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getNumberOfPoints

int getNumberOfPoints()
                      throws IOException,
                             AutomationException
Number of intermediate points (vertices) along the link path.

Product Availability

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

Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgLink.removePoint(int), INgLink.getInitialPoints(), INgLink.getPoints(com.esri.arcgis.schematic.INgView), INgLink.addPoint(int, com.esri.arcgis.schematic.INgPoint)

getFromPoint

INgPoint getFromPoint(INgView view)
                      throws IOException,
                             AutomationException
Point position where the link connects its origin node, if a port is not specified for the connection.

Product Availability

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

Parameters:
view - A reference to a com.esri.arcgis.schematic.INgView (in)
Returns:
A reference to a com.esri.arcgis.schematic.INgPoint
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getToPoint

INgPoint getToPoint(INgView view)
                    throws IOException,
                           AutomationException
Point position where the link connects its end node, if a port is not specified for the connection.

Product Availability

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

Parameters:
view - A reference to a com.esri.arcgis.schematic.INgView (in)
Returns:
A reference to a com.esri.arcgis.schematic.INgPoint
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addPoint

void addPoint(int numPoint,
              INgPoint point)
              throws IOException,
                     AutomationException
Adds the link point 'numPoint' (that is, adds the vertex 'numpoint') at the position 'point' on the link.

Product Availability

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

Parameters:
numPoint - The numPoint (in)
point - A reference to a com.esri.arcgis.schematic.INgPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgLink.removePoint(int), INgLink.movePoint(int, double, double, int)

removePoint

void removePoint(int numPoint)
                 throws IOException,
                        AutomationException
Removes the 'numPoint' link point (that is, removes the vertex 'numpoint') on the link.

Product Availability

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

Parameters:
numPoint - The numPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgLink.removeAllPoints(), INgLink.movePoint(int, double, double, int), INgLink.addPoint(int, com.esri.arcgis.schematic.INgPoint)

removeAllPoints

void removeAllPoints()
                     throws IOException,
                            AutomationException
Removes all of the link points (that is, all vertices) on the link.

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.
See Also:
INgLink.removePoint(int), INgLink.movePoint(int, double, double, int), INgLink.addPoint(int, com.esri.arcgis.schematic.INgPoint)

getEffect

Object getEffect(int effect)
                 throws IOException,
                        AutomationException
Returns the effect 'effect' set for the link (see esriNgLinkEffect).

Description

Only the effects set by calling the SetEffect method on the INgLink interface in the project code will be returned when using the GetEffect method. If the GetEffect method returns no value, the GetCurrentEffect method can return a value. The effect returned in this case can have been set either when defining the related element type effects or the properties effects related to the link.

Product Availability

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

Parameters:
effect - A com.esri.arcgis.schematic.esriNgLinkEffect constant (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgLink.getCurrentEffect(int), INgLink.removeEffect(int), INgLink.setEffect(int, java.lang.Object), INgLink.isEffectSet(int)

setEffect

void setEffect(int effect,
               Object effValue)
               throws IOException,
                      AutomationException
Modifies the effect 'effect' set for the link (see esriNgLinkEffect).

Product Availability

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

Parameters:
effect - A com.esri.arcgis.schematic.esriNgLinkEffect constant (in)
effValue - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgLink.getCurrentEffect(int), INgLink.removeEffect(int), INgLink.getEffect(int), INgLink.isEffectSet(int)

removeEffect

void removeEffect(int effect)
                  throws IOException,
                         AutomationException
Removes the effect or restores the default effect 'effect' set for the link (see esriNgLinkEffect).

Description

Note that when removing an effect that is always set the link default effect value is automatically restored; and removing an effect that is not set by default, really removes the link effect.

Product Availability

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

Parameters:
effect - A com.esri.arcgis.schematic.esriNgLinkEffect constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgLink.getCurrentEffect(int), INgLink.setEffect(int, java.lang.Object), INgLink.getEffect(int), INgLink.isEffectSet(int)

isEffectSet

boolean isEffectSet(int effect)
                    throws IOException,
                           AutomationException
Indicates if the effect 'effect' related to the link is set (see esriNgLinkEffect).

Description

By default, Schematics automatically sets default values for some link effects (see the List of the default link effects values, below). For all these effects, the IsEffectSet method returns True.

For the others effects (those that are not automatically set by default), the IsEffectSet function returns True only if the effect was set by calling the INgLink SetEffect method in the project.

Note that if the IsEffectSet method returns False for a given effect (for example, esriNgLineColor), the GetEffect method returns no value BUT the GetCurrentEffect method can return a value! Indeed, the GetCurrentEffect method can return the link effect that come either from its related element type effects definition or from its related properties effects definition.


List of the default link effect values

esriNgLinkArrowMode: esriNgNoArrow

esriNgLinkDetectability: esriNgDetectable.

esriNgLinkHighlightedState: esriNgNotHighlighted

esriNgLinkMobility: esriNgMovable.

esriNgLinkPriority: 101 or more

esriNgLinkSelectability: esriNgSelectable

esriNgLinkVisibility: esriNgVisible


For more details, see the Link Effects Constants Definition.

Product Availability

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

Parameters:
effect - A com.esri.arcgis.schematic.esriNgLinkEffect constant (in)
Returns:
The isSet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgLink.getCurrentEffect(int), INgLink.removeEffect(int), INgLink.setEffect(int, java.lang.Object), INgLink.getEffect(int)

getInitialPoints

INgPoints getInitialPoints()
                           throws IOException,
                                  AutomationException
List of the intermediate points that initially defined the link path.

Product Availability

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

Returns:
A reference to a com.esri.arcgis.schematic.INgPoints
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgLink.getNumberOfPoints(), INgLink.getPoints(com.esri.arcgis.schematic.INgView)

setInitialPoints

void setInitialPoints(INgPoints pVal)
                      throws IOException,
                             AutomationException
List of the intermediate points that initially defined the link path.

Product Availability

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

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

restoreInitialPosition

void restoreInitialPosition()
                            throws IOException,
                                   AutomationException
Restores the link to its initially defined position (that is, with or without its initially defined vertices).

Description

These intermediate points (if they exist) are those stored in the InitialPoints link property

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.
See Also:
INgDiagram.restoreInitialPosition(int, int)

getPatternModels

INgPatternModels getPatternModels()
                                  throws IOException,
                                         AutomationException
List of the pattern models directly associated with the link.

Product Availability

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

Returns:
A reference to a com.esri.arcgis.schematic.INgPatternModels
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgProject.getPatternModels(), INgElementType.getPatternModels(), INgLink

addPatternModel

void addPatternModel(INgPatternModel patternModel)
                     throws IOException,
                            AutomationException
Adds the pattern model 'patternModel' on the link.

Description

This pattern model must have already been created. Note that if you want to display each link element of a specific element type with patterns, you can directly use INgElementType AddPatternModel method on the associated link element type.

Product Availability

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

Parameters:
patternModel - A reference to a com.esri.arcgis.schematic.INgPatternModel (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgElementType.addPatternModel(com.esri.arcgis.schematic.INgPatternModel), INgLink.removePatternModel(com.esri.arcgis.schematic.INgPatternModel)

removePatternModel

void removePatternModel(INgPatternModel patternModel)
                        throws IOException,
                               AutomationException
Removes the pattern model 'patternModel' assigned to the link.

Product Availability

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

Parameters:
patternModel - A reference to a com.esri.arcgis.schematic.INgPatternModel (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgPatternModel.delete(), INgLink.addPatternModel(com.esri.arcgis.schematic.INgPatternModel)

getCurrentEffect

Object getCurrentEffect(int effect)
                        throws IOException,
                               AutomationException
Returns the current 'effValue' value for the effect 'effect' set for the link (see esriNgLinkEffect).

Description

Current effect set for a link can come from its associated element type effects definition, its related properties effects definition, its own effects definition.

Product Availability

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

Parameters:
effect - A com.esri.arcgis.schematic.esriNgLinkEffect constant (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgLink.removeEffect(int), INgLink.setEffect(int, java.lang.Object), INgLink.getEffect(int), INgLink.isEffectSet(int)

getNumSegmentAtPoint

int getNumSegmentAtPoint(INgView view,
                         INgPoint point)
                         throws IOException,
                                AutomationException
Returns the sequence number of the link's segment located at the position 'point' in the view 'view'.

Description

At least, one segment composes a link. Links with N intermediate points are composed with (N+1) segments. Segment numbering runs from 1 to N, from the origin to the extremity of the link.

Product Availability

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

Parameters:
view - A reference to a com.esri.arcgis.schematic.INgView (in)
point - A reference to a com.esri.arcgis.schematic.INgPoint (in)
Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getNodesOnLink

INgNodes getNodesOnLink()
                        throws IOException,
                               AutomationException
List of the nodes-on-link related to the link.

Product Availability

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

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

getSubLinks

INgLinks getSubLinks()
                     throws IOException,
                            AutomationException
List of the sub-links related to the link.

Product Availability

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

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

movePoint

void movePoint(int numPoint,
               double x,
               double y,
               int moveMode)
               throws IOException,
                      AutomationException
Moves the link point 'numPoint' at the relative or absolute (x,y) position.

Remarks

If there are schematic relations between schematics objects contained in a schematic diagram, it’s the developer responsibility to call the appropriate ISchematicRelationController or ISchematicRelationManager methods for the related objects as the containers to be automatically redrawn when he uses the INgLink:MovePoint method. Please also note that programming the relations redraw on the INgProjectEvents::OnMoveElements or ISchematicRelationControllerEvent::OnMoveElements events will be completely unuseful because these events are only triggered when schematic elements are moved using the GUI tools; that is when end-users move schematic elements using the mouse or the keyboard arrows. So when elements are moved by programming using any "Move" method, the custom code specified on these events will be not fired. In this case, you must either force the redraw at the end of the move operations sequences in your custom procedure or customize the SchematicAlgorithmEvents::AfterExecuteAlgorithm event (when the "Move" methods are called during a custom algorithm).

Product Availability

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

Parameters:
numPoint - The numPoint (in)
x - The x (in)
y - The y (in)
moveMode - A com.esri.arcgis.schematic.esriNgMoveMode constant (in, optional, pass 2085 if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgLink.removePoint(int), INgLink.addPoint(int, com.esri.arcgis.schematic.INgPoint)

getCurrentPatternModels

INgPatternModels getCurrentPatternModels()
                                         throws IOException,
                                                AutomationException
List of the pattern models currently associated with the link.

Product Availability

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

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