GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoView Class / CreateLink Method
if null, this method will return null
if null, this method will return null
In This Topic
    CreateLink Method
    In This Topic
    The GoToolLinking class calls this method to create a new link between ports.
    Syntax
    public virtual IGoLink CreateLink( 
       IGoPort fromPort,
       IGoPort toPort
    )

    Parameters

    fromPort
    if null, this method will return null
    toPort
    if null, this method will return null
    Remarks
    By default this method creates a copy of the NewLinkPrototype object, assigns the IGoLink.FromPort and IGoLink.ToPort properties. How it adds the new link to this view's document depends on the ports. If both of the ports belong to GoSubGraphBases, it adds the new link to the common parent GoSubGraphBase for both ports. Otherwise it adds the new link to the document's GoDocument.LinksLayer. If the new link is IGoRoutable, its IGoRoutable.UpdateRoute method is called. The LinkCreated event is not raised here; it is raised by DoNewLink.
    See Also