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