Keysight Pathwave 89600 VSA .NET API
Create() Method
See Also  Example
Agilent.SA.Vsa.Interfaces Assembly > Agilent.SA.Vsa Namespace > ApplicationFactory Class > Create Method : Create() Method


Glossary Item Box

This method returns a handle to the Application object of an already running instance of Keysight 89600 VSA software, if any.

Syntax

Visual Basic (Declaration) 
Public Overloads Shared Function Create() As Application
C# 
public static Application Create()
C++/CLI 
public:
static Application^ Create(); 

Return Value

A handle to an Application object. If no instances of Keysight 89600 VSA are running, null is returned. If multiple instances are running, the returned handle is always for the instance with the lowest port number.

Remarks

If there are no instances of Keysight 89600 VSA running, a new instance is not created.

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.

Example

C#Copy Code
// First, try getting a reference to an already running 89600 VSA.
Application app = ApplicationFactory.Create();
bool isCreated = false; 
 
if (app == null)
{
    // There is no running 89600 VSA; try to create a new one.
    app = ApplicationFactory.Create(true, null, null, -1);
    isCreated = true; 
}
 
app.IsVisible = true;                // Make the main window visible
app.Title = "Custom title";          // Label the VSA main window

Requirements

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

See Also

Copyright © 2010-2024 Keysight Technologies, Inc.