Base.LinkName Property

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Base.LinkName Property

BR.AN.PviServices .NET


Gets or sets the LinkName of this instance

[Visual Basic]

Public Property LinkName() As String

  Public Get

  End Get

  Public Set

  End Set

End Property

[C#]

public string LinkName { public get; public set; }

Remarks

For accessing an existing object by linking, it is necessary to set the LinkName of the link variable to call Connect(ConnectionType)

Example

// Creating service and cpu object
Service service = new Service("Service1");
service.Connect();
Cpu cpu = new Cpu(service,"Cpu1");
cpu.Connect();
..
..
// Creating connection to global Variable
Variable globVar = new Variable(cpu,"var1");
globVar.Connect();
globVar.Connected += new PviEventHandler(Var_Connected);
..
..
private void Var_Connected(object sender, PviEventArgs e)
{
    // Creating link connection to existing variable
    Variable linkToGlobVar = new Variable(cpuObj,"linkVar");
    linkToGlobVar.LinkName = "Service1.Cpu1.var1";    // or globVar.FullName;
    linkToGlobVar.Connect(ConnectionType.Link);
}

So the LinkName property equals the FullName property of the PviServices object to link.

See Also

Base Class | BR.AN.PviServices Namespace


Generated from assembly BR.AN.PviServices [8.1.0.4]