NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

I want to Access the Sequence File Comment In the User Interface...

I can access the comment from the MainSequence of the Sequence, but not the sequence comment (SeqEditor: Edit->Sequence File Properties...).

I'm using the following C command:

TS_PropertyGetProperty (panelRec->seqFile->seqFileH, &errorInfo, TS_PropertyComment, CAVT_CSTRING, &psCommentStr);

the psCommentStr comes up empty and I get no errors, although, I know that there is a comment entered in the field. I added this call to the UpdateOnSequenceChange function of seqdisp.c of the Example User Interface.

I'm pretty sure that this should work, but all I get is a "" (Empty string).
0 Kudos
Message 1 of 3
(2,737 Views)
Hi Capt. Jack,

The comment property of a sequence file is not stored in the PropertyObject of the sequence file itself. It is instead stored in the sequence file's PropertyObjectFile.Data PropertyObject's PropertyObject.Comment property. There is a KnowledgeBase document at the following link that explains this along with an easy to follow sequence file example that uses ActiveX Automation Adapter steps to access the sequence file's own comment property in the manner mentioned above:

Link -> http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/64fbaf3526e8511786256bd1006b8e1c?OpenDocument

Jason F.
Applications Engineer
National Instruments
www.ni.com/ask
Message 2 of 3
(2,737 Views)
Your suggestion got me to a solution - I used the following to get the comment in C:

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

Then all I had to do was:

TS_PropertyGetProperty (dataProperty, &errorInfo, TS_PropertyComment, CAVT_CSTRING, &psCommentStr);

And this allows me to get the sequence file comments.

Thanks!
0 Kudos
Message 3 of 3
(2,737 Views)