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


IDisplacementLinkElement Interface (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > EditorExt > ESRI.ArcGIS.EditorExt > Interfaces > ID > IDisplacementLinkElement Interface
ArcGIS Developer Help

IDisplacementLinkElement Interface

Provides access to members that control the displacement link element.

Product Availability

Available with ArcGIS Desktop.

When To Use

Use this interface to set the ID of a displacement link and its draw symbol. The defaults for both properties can be obtained from the IAdjustProperties interface.

Members

Name Description
Read/write property ID Link ID.
Read/write property Symbol Line symbol this element uses to draw itself.

Classes that implement IDisplacementLinkElement

Classes Description
DisplacementLinkElement The Graphic Element to display adjustment links.

Remarks

A displacement link is a type of graphic element that supports the IDisplacementLink interface.

[C#]

You can differentiate displacement links from other graphic elements by using C#'s is keyword. The following code shows an example of this.

public void GetLink()
{
  //You can get app from ICommand :: OnCreate() hook parameter
  IMxDocument mxDoc = app.Document as IMxDocument;
  IGraphicsContainer graphicsContainer = mxDoc.FocusMap() as IGraphicsContainer;
  graphicsContainer.Reset();

  IElement element = graphicsContainer.Next();
  while (element != null)
  {
    if (element is IDisplacementLinkElement)
    { 
      //Do something with the link.
    }
    element = graphicsContainer.Next();
  }
}
[Visual Basic .NET]

You can differentiate displacement links from other graphic elements by using VBNet's TypeOf keyword. The following code shows an example of this.

  Public Sub GetLink()
    'You can get app from ICommand :: OnCreate() hook parameter
    Dim mxDoc As IMxDocument = TryCast(app.Document, IMxDocument)
    Dim graphicsContainer As IGraphicsContainer = TryCast(mxDoc.FocusMap(), IGraphicsContainer)
    graphicsContainer.Reset()

    Dim element As IElement = graphicsContainer.Next()
    While Not element Is Nothing
      If TypeOf element Is IDisplacementLinkElement Then
        'Do something with the link.
      End If
      element = graphicsContainer.Next()
    End While
  End Sub

See Also

ITransformationMethod Interface