NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Error Creating String types using NewSubProperty of TestStand3

I keep getting error -17500 when using the NewSubProperty method of the Property object to create a new string type in TestStand3. The method works ok with number and boolean types, but fails with string types (see attached file).

The same method works & will create a string in TestStand2. Is this a bug with TestStand3? The only workaround I've found so far is to create the string in Labview by calling the TestStand - Set property Value.vi. However, I want to be able to create the string directly in TestStand3. Anyone else experienced this, or know a fix?
0 Kudos
Message 1 of 4
(3,506 Views)
In the Edit ActiveX/COM Call dialog box (click on Specify Module) for the Create Path String step, change the value of asArray from False to True. Evidently this function treats strings as an array of characters.
- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 4
(3,506 Views)
David,

> I keep getting error -17500 when using the NewSubProperty method of
> the Property object to create a new string type in TestStand3. The
> method works ok with number and boolean types, but fails with string
> types (see attached file).
>
> The same method works & will create a string in TestStand2. Is this
a
> bug with TestStand3? The only workaround I've found so far is to
> create the string in Labview by calling the TestStand - Set property
> Value.vi. However, I want to be able to create the string directly
in
> TestStand3. Anyone else experienced this, or know a fix?

I assume this is a bug.

I've just encountered the same problem using VB 6 to call the
TestStand 3.0 API. Code that worked fine under TestStand 2.01f fails
under TestStand 3.0 when add
ing a String subproperty. Creating a new
subproperty of any other data types - including custom named types -
works fine.

The workaround I used in VB was, instead of calling 'NewSubProperty',
I perform the following steps:
1) Create a new property object.
2) Name it.
3) Call 'SetValString' on the new propery object to set it to a sting.
4) Call 'InsertSubProperty' on the parent property object to add my
new propery object.

This appears to work for all data types, so I replaced all my
instances of NewSubProperty with the above steps. However, since I
assume these steps are what the 'NewSubProperty' method does behind
the scenes anyway, it would appear something in 'NewSubProperty' got
broken for strings.

Good luck,

---
Bob
0 Kudos
Message 3 of 4
(3,506 Views)
David,
This is a known issue with TestStand and will be fixed in the next version. In the mean time, instead of your regular call, you can use the SetValString method of the PropertyObject Class. The call looks like this one:
PropertyObject.SetValString("ABC", PropOption_InsertIfMissing, "");
I have modified your example sequence to implement this call. I hope this is useful.
Regards,
Diego Reyes
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(3,506 Views)