NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to add a container object in a station globals

Hi,

 

How to add a container object in a station globals

0 Kudos
Message 1 of 6
(4,684 Views)

In TestStand go to View>>Station Globals (or click Ctr->G).

 

Right click in the Station Globals window.  Select Insert Station Global>>Container..

 

Attached is an image.

 

Hope this helps,

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

Thank you for your response ?

 

But it is not what I want to do ! .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 3 of 6
(4,677 Views)

Hi radlou,

 

This might be what you're looking for:

 

NewSubProperty Method

Syntax

PropertyObject.NewSubProperty ( lookupString, ValueType, asArray, typeNameParam, options)

Purpose

Creates a new subproperty with the name the lookupString parameter specifies.

Parameters

lookupString As String

[In] Pass the lookup string for the new subproperty to be created. If you pass a lookup string with multiple levels (such as "x.y.z"), this method creates all of the necessary intermediate container objects. Refer to lookup string for more information about the strings you can use.

ValueType As PropertyValueTypes

[In] Pass the type of value you want the new subproperty to store.

asArray As Boolean

[In] Pass True to make the new subproperty an array whose elements are of the type you specify in valueType.

typeNameParam As String

[In] Pass the name of an existing type if you want to create the new subproperty as an instance of a named type. Otherwise, pass an empty string. If you pass a type name, you must pass PropValType_NamedType for the ValueType parameter. Refer to NamedPropertyTypes for a list of built-in named types.

options As Long

[In] Pass 0 to specify the default behavior, or pass one or more PropertyOptions constants. Use the bitwise-OR operator to specify multiple options. You do not need to pass the InsertIfMissing option to create the new subproperty. Pass DoNothingIfExists if you want the method to not report an error if the subproperty already exists.

0 Kudos
Message 4 of 6
(4,667 Views)

Hi Radlou,

 

In fact with TestStand you can create programmatically custom datatype, included Containters. 

For this purpose you can use the NewPropertyObject from the NI-TestStand API server.

 

Also, i invite you to read the information presented from the following internet link, and to launch the corresponding sequence in order to understand the process:

How To Create A Custom Datatype Programmatically

http://zone.ni.com/devzone/cda/epd/p/id/3606

 

Best regards,

0 Kudos
Message 5 of 6
(4,654 Views)

Hi Radlou, Hi Remi

 

This example is only interresting if you are using NamesTypes !

NamedTypes are pretty well there are a lot of advantages, especailly if you are

using them in arrays. But there is one behavior that should be mentioned !

If you store them on INI-File you have to distribute this files !!

And often you have some version. And if your are not famous with TS

i will say: "Welcome to the Type Conflict Hell"

 

My opinion is: "Avoiding Names Types if there is no need".

I am interesting what other members and NI will think about this.

 

 

Regards

 

Juergen

 

In this thread there is an example without:

http://forums.ni.com/t5/NI-TestStand/How-to-add-a-container-object-in-a-station-global-in-a-vb-net/m...

 

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