From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Variables in text

If I type the following into a text area in Report view:
 
Datafile - @datadrvuser@@datafile@.@dataextension
 
then I should get the text:
 
Datafile - C:\my folder\myfile.tdm
 
but I actually get:
 
Datafile - C:\myfolder\.DAT
 
This always used to work in the older versions of Diadem but doesn't seem to work now. Not only do I not get the file name but it places .DAT on the end and not .TDM when the data file is a TDM file?
 
Any clues?
 
Thanks,
Si.
 
 
 
0 Kudos
Message 1 of 2
(2,864 Views)
Hello Si Aldworth,

In the DIAdem online help you find the following:

Specifies the name of the current DIAdem Dat data file without the extension.

Definition DataFile, Filename variable


Note New loading commands, for example for TDM files, store the name of the data file in the DataSetName variable.

An other way to get that information is to use channel properties as follows:
ChnPropGet("[1]/ChnName", "sourcedatafilename")   ' Specifies the filename, if DIAdem loads the channel from a file.
ChnPropGet("[1]/ChnName", "sourcedatafilepath")     ' Specifies the file path, if DIAdem loads the channel from a file.

Greetings
Walter

0 Kudos
Message 2 of 2
(2,857 Views)