NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing Sequence File Comment using VB

Hi,

I there any example available for the topic above?

Thanks,
Sunny
0 Kudos
Message 1 of 5
(3,417 Views)
Hi Sunny,
unfortunately, TestStand doesn't as yet work with the property getting the sequencefile comment. It's been flagged up to NI, but the only thing I can suggest is to find the sequencefile filename (and path) which are in Runstate.SequenceFile.Path, and then you have to load it as a text file, and search through it for [SF] and then find the next %COMMENT = before you find another [.
Note this may be split across multiple lines.

Hope that helps.
Can't provide an example because I don't have VB, but attached is the TestStand sequence (2.0.1f1) that shows the api call you would have normally made that doesn't work.

S.
// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 2 of 5
(3,417 Views)
Sunny,

We have a Knowledge Base written on this topic. To quote from the KB:

To access a sequence file's comment, you will first have to obtain a reference to the sequence file's PropertyObjectFile.Data property. From the Data property you can access its PropertyObject.Comment subproperty which will contain the sequence file's actual comment.

You will simply use the TestStand API from within Visual Basic to access the PropertyObjectFile.Data and PropertyObject.Comment fields.

The original article can be found at
KB 2M6DHCEV How Do I Access a TestStand Sequence File's Comment Subproperty Programmatically?
There is even an e
xample sequence included in the Knowledge Base.

Regards and good luck,
Shannon R.
Applications Engineer
National Instruments
Message 3 of 5
(3,417 Views)
You see - that's what I love about the discussion group - I get countless opportunities to get it wrong - didn't spot that one - Thanks Shannon. Thus armed I shan't have to do it the text file method again!
Silly question, but why doesn't it get stored / mirrored in the PropertyObject.Comment - would make coding a little easier on the eye - maybe for the next release?

Thanks

S.
// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 4 of 5
(3,417 Views)
Sacha,

I agree that it would make more sense on the evaluation of the Sequence File Comment alone. However, if you look under the Data property, there is more information about the Sequence File itself. I think the concept was to group all the Sequence File information together under the Data subproperty.

Hope that helps everything make a little more sense. Great job with your answers by the way. You are usually right on!

Regards,
Shannon R.
0 Kudos
Message 5 of 5
(3,417 Views)