Keysight Pathwave 89600 VSA .NET API
Create(Boolean,String,String,Int32,Int32,CreateOptions,String) Method
See Also 
Agilent.SA.Vsa.Interfaces Assembly > Agilent.SA.Vsa Namespace > ApplicationFactory Class > Create Method : Create(Boolean,String,String,Int32,Int32,CreateOptions,String) Method


startNewCopy
If false, attempts to connect to an already-running instance of Keysight 89600 VSA software. If true, attempts to start a new instance. Note that this method will wait indefinitely for the new application to start. If you wish to specify a maximum time to wait, see the Create(Boolean,String,String,Int32,Int32) overload.
version

Specifies the version string of the version to start. This string is of the form nn.n[_Modifier], where "n" is a single digit and "_Modifier" is an optional modifier used for special releases (i.e. "_Beta2").

If null or the empty string is specified, the latest available version is used. If a non-null string is specified and the requested version is not installed, a System.ArgumentException is raised. This parameter is ignored if startNewCopy is false.

You can find the version string from a currently running VSA by opening the About dialog (Help > About).

hostName
The hostname is currently restricted to the name of the host on which the calling application is running, or the value 'localhost'. If this parameter is null or the empty string, 'localhost' is assumed. It is currently not possible to programmatically connect to or start an instance of Keysight 89600 VSA software on a remote computer.
portNumber
The TCP port number to use for the connection. If set to a value less than 0, the first available port number greater than or equal to 60189 is used. If startNewCopy is false, there must already be a running instance of Keysight 89600 VSA. If startNewCopy is true, the specified port number must not already be in use. If it is, an System.ArgumentException is thrown.
secondsToWait
This parameter specifies the number of seconds to wait for a new instance of Keysight 89600 VSA software to start. A number less than or equal to 0 specifies to wait indefinitely. If the new instance of the application does not start within the stipulated time this function will return null.
options
This parameter enables other non-default application creation options to be specified. Please see CreateOptions for a description of these options.
commandLineArguments
This parameter allows additional command line options to be specified if startNewCopy is true.

Glossary Item Box

This method returns a handle to the Application object of an instance of Keysight 89600 VSA that is listening on the indicated port number on the indicated host, optionally creating an instance if requested and waiting for a stipulated period of time for the new instance to start.

Syntax

Visual Basic (Declaration) 
Public Overloads Shared Function Create( _
   ByVal startNewCopy As Boolean, _
   ByVal version As String, _
   ByVal hostName As String, _
   ByVal portNumber As Integer, _
   ByVal secondsToWait As Integer, _
   ByVal options As CreateOptions, _
   ByVal commandLineArguments As String _
) As Application
C# 
public static Application Create( 
   bool startNewCopy,
   string version,
   string hostName,
   int portNumber,
   int secondsToWait,
   CreateOptions options,
   string commandLineArguments
)
C++/CLI 
public:
static Application^ Create( 
   bool startNewCopy,
   String^ version,
   String^ hostName,
   int portNumber,
   int secondsToWait,
   CreateOptions options,
   String^ commandLineArguments
) 

Parameters

startNewCopy
If false, attempts to connect to an already-running instance of Keysight 89600 VSA software. If true, attempts to start a new instance. Note that this method will wait indefinitely for the new application to start. If you wish to specify a maximum time to wait, see the Create(Boolean,String,String,Int32,Int32) overload.
version

Specifies the version string of the version to start. This string is of the form nn.n[_Modifier], where "n" is a single digit and "_Modifier" is an optional modifier used for special releases (i.e. "_Beta2").

If null or the empty string is specified, the latest available version is used. If a non-null string is specified and the requested version is not installed, a System.ArgumentException is raised. This parameter is ignored if startNewCopy is false.

You can find the version string from a currently running VSA by opening the About dialog (Help > About).

hostName
The hostname is currently restricted to the name of the host on which the calling application is running, or the value 'localhost'. If this parameter is null or the empty string, 'localhost' is assumed. It is currently not possible to programmatically connect to or start an instance of Keysight 89600 VSA software on a remote computer.
portNumber
The TCP port number to use for the connection. If set to a value less than 0, the first available port number greater than or equal to 60189 is used. If startNewCopy is false, there must already be a running instance of Keysight 89600 VSA. If startNewCopy is true, the specified port number must not already be in use. If it is, an System.ArgumentException is thrown.
secondsToWait
This parameter specifies the number of seconds to wait for a new instance of Keysight 89600 VSA software to start. A number less than or equal to 0 specifies to wait indefinitely. If the new instance of the application does not start within the stipulated time this function will return null.
options
This parameter enables other non-default application creation options to be specified. Please see CreateOptions for a description of these options.
commandLineArguments
This parameter allows additional command line options to be specified if startNewCopy is true.

Return Value

A handle to an Application object, or null if startNewCopy is false and no instances are running.

Exceptions

ExceptionDescription
System.ArgumentExceptionIs raised if an explicitly requested version is not installed.
System.ArgumentExceptionIs raised if an explicitly requested port number is already in use and a new instance of Keysight 89600 VSA is being started.

Remarks

If startNewCopy is false, an instance that is listening at the indicated port number must already be running. If portNumber is less than 0, the default the returned instance is the one with the lowest port number. If startNewCopy is true, there must not already be an instance listening at the indicated port number.

On a 64-bit version of Windows, the Create() method will return a reference to the 64-bit version of the VSA when the version of the Agilent.SA.Vsa.VsaInterfaces assembly referenced by your program is 15.00 or later. When your program references an earlier version, the 32-bit version of the VSA is the default.

You can change the default by setting the Utilities > Startup Preferences > Programmatic Startup parameter. You can also specify whether to get a handle to a 32-bit or 64-bit instance by using the other overloads of the Create() method.

Requirements

Target Platforms: Windows 11 Professional or Enterprise; Windows 10 Professional, Enterprise, or Education (64-bit)

Minimum Software Version Requirement: Keysight PathWave 89600 VSA Ver 14.20

See Also

Copyright © 2010-2024 Keysight Technologies, Inc.