NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Update All Types' Versions in Type Palette

Does anyone have a quick way to update the versions of multiple types in a type palette?  I can change them one by one in the Types editor, but that's very tedious when I've got 50+ types.

 

I'm working on a set of custom step types that we are distributing in a type palette.  For content management purposes, it would be nice to have all of our custom step types and our custom data types have the same version.

 

I could save my type palette as INI or XML format and do a search and replace, but that's a cludge. I'm sure I could write a small sequence using the TestStand API to do this, but wanted to see if anyone else has had to do it before to save myself some time.

 

I'm also open to being convinced that this is a bad idea if someone can give a compelling reason.

Josh W.
Certified TestStand Architect
Formerly blue
Message 1 of 4
(3,957 Views)

Create dummy types with the correct version and use the type differ to merge? Though that's probably no better than either of the two things you suggested.

CTA, CLA, MTFBWY
0 Kudos
Message 2 of 4
(3,947 Views)

Hi Josh,

 

I am also looking for the same thing. I found something, but it is not the perfect solution.

 

1. Have the names of all the step types in the palette file. You can put them in an array variable in a sequence, or read from a file.

2. Use the RunState.Engine.GetTypeDefinition("<TypeName>") and store the resulting object reference in a local variable 'TypeDef'

3. Use Locals.TypeDef.AsPropertyObject.TypeVersion = "<NewVersion>" to set the new version.

 

THe reason I say it is not perfect is that I would like to somehow get the type names from a type palette file automatically. I haven't been able to figure that out. Any help will be great!

 

Cheers,

Aditya

TestStand 4.2.1

LabVIEW 2009 SP1

0 Kudos
Message 3 of 4
(3,814 Views)

Found it!!

 

The attached file will

1. Show you all the type palettes you currently have on your station and ask you to choose the one you want to update

2. Ask for the new type version

3. Update all types with new type version (apart from the ones which are from NI like Substeps)

4. Increments palette file change count

5. Prompts user to save palette file

 

Thanks to @dug9000 for the help.

 

Cheers,

Aditya

TestStand 4.2.1

LabVIEW2009 SP1


@Changi wrote:

Hi Josh,

 

I am also looking for the same thing. I found something, but it is not the perfect solution.

 

1. Have the names of all the step types in the palette file. You can put them in an array variable in a sequence, or read from a file.

2. Use the RunState.Engine.GetTypeDefinition("<TypeName>") and store the resulting object reference in a local variable 'TypeDef'

3. Use Locals.TypeDef.AsPropertyObject.TypeVersion = "<NewVersion>" to set the new version.

 

THe reason I say it is not perfect is that I would like to somehow get the type names from a type palette file automatically. I haven't been able to figure that out. Any help will be great!

 

Cheers,

Aditya

TestStand 4.2.1

LabVIEW 2009 SP1


 

Message 4 of 4
(3,803 Views)