NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I Pass an Interface as a parameter from VB

I am attempting to pass a reference to the TestSstand
mainsequence as a parameter in a newexection method from Visual Basic.

I am not using a process model. The parameter I would like to pass are listed below.

UUT
SerialNumber (String)
UUTLoopIndex (Number)
SubTestId (String)
NGFRef (IUnknown Interface)

All of the parameters come through except the NGFRef one with the code listed below. NGFRef is null. What am I doing wrong?

dim goFixture as Fixture
set goFixture = new Fixture

Dim seqArgs As PropertyObject
Set seqArgs = mEngine.NewPropertyObject(PropValType_Container, False, "", 0)

seqArgs.SetValString "UUT.SerialNumber", PropOption_InsertIfMissing, sDUTSerial

seqArgs.
SetValNumber "UUT.UUTLoopIndex", PropOption_InsertIfMissing, 0

seqArgs.SetValString "SubTestId", PropOption_InsertIfMissing, sSubTestId

seqArgs.SetValIInterface "NGFRef", PropOption_InsertIfMissing, goFixture

Dim modelSeqFile As SequenceFile
Dim modelDescription As String

Set mCurrentExecution = mEngine.NewExecution(mCurrentSequenceFile, "MainSequence", _ Nothing, False, ExecTypeMask_Normal, _ seqArgs)
0 Kudos
Message 1 of 2
(2,711 Views)
Estaban,

It seems that you are creating and setting the variables correcly. However, you didn't mention what is the Fixture data. It is an Object, a class, what is it? Have you tried using the SetValIDispatch method instead of the SetValInterface?

Roberto Piacentini
National Instruments
Applications Engineer
www.ni.com/support
0 Kudos
Message 2 of 2
(2,711 Views)