LicenseServer.Port Property

ClosedDescription

Returns the port where the detected BarTender Licensing Server that owns BarTender's active license (PKC) is running. Read-only.

ClosedSyntax

LicenseServer.Port

ClosedRequirements

Version

BarTender 6.12 or higher

Edition

Automation, Enterprise

ClosedVB.NET Example

'Declare a BarTender application variable

Dim btApp As BarTender.Application

'Create a new instance of BarTender

btApp = New BarTender.Application

'Set the BarTender application visible

btApp.Visible = True

'Show the port of the BarTender Licensing Service if BarTender is connected to it

If btApp.LicenseServer.Connect = True Then

MessageBox.Show(btApp.LicenseServer.Port)

Else

MessageBox.Show("Not Connected")

End If

'End the BarTender process

btApp.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges)

ClosedC# Example

// Declare a BarTender application variable

BarTender.Application btApp;

// Create a new instance of BarTender

btApp = new BarTender.Application();

// Set the BarTender application visible

btApp.Visible = true;

// Show the port of the BarTender Licensing Service if BarTender is connected to it

if (btApp.LicenseServer.Connect())

{

MessageBox.Show(btApp.LicenseServer.Port.ToString());

}

else

{

MessageBox.Show("Not Connected");

}

// End the BarTender process

btApp.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges);