I am having an impossible time trying to control the 89600B VSA Sotware (14.0) with VB 2010. I can add the interface reference from \interface\ or \interface_v3.5\ with different results.
When I add the standard interface reference from \interface\ the following line of code won't work
Dim appVSA As Agilent.SA.Vsa.Application
The error says I need to add a reference
When I add the standard interface reference from \interface_v3.5\ I can set and create the application, change the title, but I can't access any of the display or trace commands without the add a reference error.
What's frustrating is that I had this working 2 weeks ago, but my hard drive died suddenly before I backed it up. I had the same issue, but I was working in VB 2008 and when I moved to VB 2010 it fixed itself.
Below is the code I was trying to test it with, any help would be greatly appreciated:
Option Explicit On
Imports Agilent.SA.Vsa
Public Class Form1
Dim appVSA As Agilent.SA.Vsa.Application
Public appCreated As Boolean
Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
If appCreated = True Then
appVSA.Title = "Agilent 89600B Vector Signal Analysis"
appVSA = Nothing
'appVSA.Quit()
End If
Me.Close()
End Sub
Private Sub btnTest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTest.Click
Dim x As Integer
Dim str As String
appVSA = Agilent.SA.Vsa.ApplicationFactory.Create()
If appVSA Is Nothing Then
appCreated = False
MsgBox("Open the 89600B Software and then restart program.", MsgBoxStyle.OkOnly)
Me.Close()
Else
appCreated = True
appVSA.Title = "89600B File Save"
'x = appVSA.Display.Traces(1).Dataname
End If
End Sub
End Class
When I add the standard interface reference from \interface\ the following line of code won't work
Dim appVSA As Agilent.SA.Vsa.Application
The error says I need to add a reference
When I add the standard interface reference from \interface_v3.5\ I can set and create the application, change the title, but I can't access any of the display or trace commands without the add a reference error.
What's frustrating is that I had this working 2 weeks ago, but my hard drive died suddenly before I backed it up. I had the same issue, but I was working in VB 2008 and when I moved to VB 2010 it fixed itself.
Below is the code I was trying to test it with, any help would be greatly appreciated:
Option Explicit On
Imports Agilent.SA.Vsa
Public Class Form1
Dim appVSA As Agilent.SA.Vsa.Application
Public appCreated As Boolean
Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
If appCreated = True Then
appVSA.Title = "Agilent 89600B Vector Signal Analysis"
appVSA = Nothing
'appVSA.Quit()
End If
Me.Close()
End Sub
Private Sub btnTest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTest.Click
Dim x As Integer
Dim str As String
appVSA = Agilent.SA.Vsa.ApplicationFactory.Create()
If appVSA Is Nothing Then
appCreated = False
MsgBox("Open the 89600B Software and then restart program.", MsgBoxStyle.OkOnly)
Me.Close()
Else
appCreated = True
appVSA.Title = "89600B File Save"
'x = appVSA.Display.Traces(1).Dataname
End If
End Sub
End Class