ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to add a container object in a station global in a vb.net application

to summarize I want to add a container object in a station global in a vb.net application.


I managed to add a string and a number with PropertyObject.SetValNumber and PropertyObject.SetValString but I failed to add a container object because I dont find a suitable Property?

 

0 Kudos
Message 1 of 16
(4,632 Views)

Hi Radlou

 

You have use PropertyObject.SetPropertyObject(...)

 

You like to add? Tell me how you have created your container?

 

Regards

 

Juergen 

 

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 2 of 16
(4,630 Views)

In fact I have to complete a station global and sometimes I need to add a container object

0 Kudos
Message 3 of 16
(4,627 Views)

Hi,

 

How did you create the container in VB.net ?

 

Regards

 

Juergen

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 4 of 16
(4,625 Views)

The station global was created manually,I have juste to complete it

0 Kudos
Message 5 of 16
(4,623 Views)

Hi Radlou

 

If possible, post a screenshot of your container and what item(s) you like to change

 

Regards

 

Juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 6 of 16
(4,619 Views)

In can change a variable but i can't add a container

0 Kudos
Message 7 of 16
(4,616 Views)

Hi Radlou,

 

Yes you can !


1. Step is to create the Container

Locals.objContainer =ThisContext.Engine.NewPropertyObject(PropValType_Container,False,"",0)

2. Add Subentrys to the Container

Locals.objContainer.AsPropertyObject.SetValString("strHello",PropOption_InsertIfMissing,"HelloWorld"),

Locals.objContainer.AsPropertyObject.SetValString("strName",PropOption_InsertIfMissing,"Juergen")

3. Add it to Station Globals

ThisContext.AsPropertyObject().SetPropertyObject("StationGlobals.MyStuff",PropOption_InsertIfMissing, Locals.objContainer)

 

Best would be a screeshoot

 

Hope this Helps

 

Juergen

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 8 of 16
(4,614 Views)

Thank you, for your help

 

I try this but to add a container below Service1 which is also a container but it not work !

 

Dim O_glb As NationalInstruments.TestStand.Interop.API.PropertyObject

O_glb.NewPropertyObject(PropertyValueTypes.PropValType_Container, False, "TS.Service1.Val", 0)

0 Kudos
Message 9 of 16
(4,611 Views)

Thank you, for your help

 

I try this but to add a container below Service1 which is also a container but it not work !

 

Dim O_glb As NationalInstruments.TestStand.Interop.API.Engine

O_glb.NewPropertyObject(PropertyValueTypes.PropValType_Container, False, "TS.Service1.Val", 0)

0 Kudos
Message 10 of 16
(4,609 Views)