LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I access a sequence file's version subproperty programmatically?

I want to access sequence file's version subproperty programmtically using the following codes:

TS_PropertyObjectFileAsPropertyObject (panelRec->seqFile->seqFileH, &errorInfo &fileProperty);
TS_PropertyGetPropertyObject(fileProperty, &errorInfo, "Data", 0, &dataProperty);
TS_PropertyGetProperty (dataProperty, &errorInfo, TS_PropertyTypeVersion, CAVT_CSTRING, &seqFileVersion);

Why doesn't it work?

Thanks,
Zhonghui Ning
0 Kudos
Message 1 of 3
(2,623 Views)
Hello Ning -

When using the TS_PropertyGetProperty(... TS_PropertyTypeVersion ...) you should see an error akin to "-17309," telling you that this particular property will only exist for property objects that are retrieved from 'type' objects in TestStand.

What this means is, that TypeVersion would be valid for objects of NI_NumericLimitTest or the like. It is not meant to be used with sequence files. You could also use this property when trying to manipulate datatypes.

When working with sequence files to retrieve the version information in TestStand 2.0.x you must use the TS_PropertyGetValString(thisContext...) and the lookup string mentioned in this earlier forum posting.

I hope this helps.

Regards,

Elaine R.
National Instruments
http://www.ni.com/support
0 Kudos
Message 2 of 3
(2,623 Views)
Hello Elaine,

I used the following to get the sequence file version according to your suggestion:

TS_PropertyObjectFileAsPropertyObject (panelRec->seqFile->seqFileH, &errorInfo, &fileProperty);
TS_PropertyGetValString (fileProperty, &errorInfo, "Data.Version", 0, &seqFileVersion);

Thanks!
Zhonghui Ning
0 Kudos
Message 3 of 3
(2,623 Views)