TestStand 2.0.1f
Visual Basic 6.0 SP3
Win2k Pro SP4
I have a process model Test UUTs sequence that accepts a custom data type as
its only Parameter. The type is a container named Type_RunOptions in the
Type Palette and the instance in the sequence Parameters tab is named
RunOptions. For discussion purposes, Type_RunOptions has three elements,
Option1, Option2 (both String) and Option3 (Number)
In my VB operator interface I attempted the following:
Set tsobjProperty = objTSEngine.NewPropertyObject(PropValType_NamedType,
False, "Type_RunOptions", 0)
tsobjProperty.SetValString "Option1", 0, sOption1
tsobjProperty.SetValString "Option2", 0, sOption2
tsobjProperty.SetValNumber "Option3", 0,
i32Option3
Set p_tsobjExecution = objTSEngine.NewExecution(p_tsobjSequenceFile, _
sSequenceName, _
p_tsobjProcessModelSequenceFile, _
False, _
ExecTypeMask_Normal, _
tsobjProperty)
When I attempt to run, the NewExecution method generates an error:
"(-17332) Type of argument is incompatible with parameter 'RunOptions'.
Expected Container, Instance of Type 'Type_RunOptions', found String."
I've also tried just creating a PropValType_Container and adding
subproperties named the same as Type_RunOptions but I got the same error.
Everything worked before when I just passed a string, so I assume I'm doing
something silly when creating the instance of Type_RunOptions.
I assume its possible to use NewPropertyObject to create instances of custom
data types? Can anyone suggest how
I can create an instance to pass to the
NewExecution method?
Thanks,
---
Joe