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


IDisplacementLinkElement Interface (ArcObjects .NET 10.6 SDK)
ArcObjects Help for .NET developers > ArcObjects namespaces > EditorExt > ESRI.ArcGIS.EditorExt > Interfaces > ID > IDisplacementLinkElement Interface (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (EditorExt)  

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.

CoClasses that implement IDisplacementLinkElement

CoClasses and 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

.NET Related Topics

Adjusting feature locations with spatial adjustment