Starting the 89600 VSA Software
This example is designed so that it does not directly reference the Agilent 89600 VSA Software installed on
your computer. This allows you to install a newer version of 89600 at a later date, without having to update
a reference and re-compile this program. There are two parts to the 89600 startup, first to create to VSA
instance as an object, and second to cast it to an Agilent.SA.Vsa.Application.
Starting the 89600 VSA Software
try
{
// This program references (with Copy Local = false) a fixed
version of
// Agilent.SA.Vsa.Interfaces.dll which is distributed with the
example.
// To start the 89600 VSA Software we are calling the
InProcessFactory. This allows
// us to get the latest installed version of the 89600 without
referencing the
// particular version of Agilent.SA.Vsa.Interfaces.dll directly.
// This has the advantage that an upgrade to the 89600 VSA
Software
// will not break this program.
// Start the latest installed version of the 89600 VSA Software
var success = Setup89600(InProcessFactory.Create(null,-1, 0,
commandLineArgs));
if(success)
{
// M90XA is running; update GUI state
lbl89600Status.Text = "89600 VSA Running";
_currentState = _currentState | State.VsaStarted;
UpdateGui();
}
else
lbl89600Status.Text = "89600 VSA Did Not Start";
}
catch (Exception ex)
{
lbl89600Status.Text = ex.Message;
}
61
X-Series Measurement Applications for Modular Instruments Startup Guide