NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

teststand lookup string with hook character

Solved!
Go to solution

Hi all,

I'd like to set a propertyobject  like that :

PropObj.SetValString("first.second[test].value", 1, ""value")

 

But I get an COMexception : A subscript is not valid for objects that are not arrays......

How can I use hook without TS believes that it's an array?

 

Thanks in advance for your help

 

0 Kudos
Message 1 of 5
(2,578 Views)

Look at the SetValStringByOffset method:

 

https://zone.ni.com/reference/en-XX/help/370052W-01/tsapiref/reftopics/propertyobject_setvalstringby...

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 5
(2,543 Views)

Sorry, but I don't see the kink with my problem.

In fact I want to create a container with this name : "test[name]"

 

0 Kudos
Message 3 of 5
(2,523 Views)

Brackets are illegal characters for variable names.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 5
(2,510 Views)
Solution
Accepted by topic author maxmont

it's what I thought.

I replaced bracket by paenthesis.

Thanks

 

0 Kudos
Message 5 of 5
(2,485 Views)