04-26-2011 03:53 AM
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?
04-26-2011 06:08 AM
04-26-2011 06:52 AM
In fact I have to complete a station global and sometimes I need to add a container object
04-26-2011 06:55 AM
04-26-2011 07:16 AM
The station global was created manually,I have juste to complete it
04-26-2011 08:02 AM
04-26-2011 08:05 AM
In can change a variable but i can't add a container
04-26-2011 08:24 AM
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
04-26-2011 09:07 AM
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)
04-26-2011 09:13 AM
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)