DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Load into Diadem via Script

This bellow is my Script to Load Data to Diadem...
My question: Is there a possibility to access from a sript directly the dialog
of "DIADEM DATA"-"Daten Laden"?
It would be much more bether because in this case i don't need
this script below for checking the amount of various data-types.


Call FileNameGet("Any","FileRead",DatFilePath_ & DatFileName_, _
"Diadem-File(*.dat),*.dat,MME-File(*.MME),*.MME,All Files (*.*),*.*",,"","YES")
If (DlgState ="IDOk") Then

DatFileName_ = FileDlgFile & FileDlgExt
DatFilePath_ = FileDlgDir
DatFileType_ = Upc(Right(FileDlgExt,3)) 'save data-type
Select Case DatFileType_
Case "MME"
Call GpiFileLoad("MMEDriver",FileDlgName) 'load .MME file

Case "DAT"
Call DataLoad(FileDlgFile) 'load .Dat file
Case "ISO"
call ......... 'load .ISO File
Case Else
Call MsgBox("File " & DatFileName_ & " loading not possible!")
Exit Sub
End Select
End If
0 Kudos
Message 1 of 5
(5,370 Views)
Currently I don't know of a way OTHER than the one you are currently implementing to do what you want. This is the way I've done it for years and continue to do.
0 Kudos
Message 2 of 5
(5,370 Views)
Hi Peter28,

DIAdem calls the same Windows SDK funtion that FileNameGet() does, so you are already effectively calling the dialog that you get when you choose File>>Open. The only difference is that the possible file types are included in the extension filter parameter, as per:

FileDlgFilt = ""
FileDlgFilt = FileDlgFilt & "DIAdem data file (*.dat), *.dat,"
FileDlgFilt = FileDlgFilt & "LabVIEW LVM file (*.lvm), *.lvm,"
FileDlgFilt = FileDlgFilt & "Excel file (*.xls), *.xls,"
FileDlgFilt = FileDlgFilt & "ASCII Import (*.*)"
FileDlgCaption = "Select the data file to load"
Call FileNameGet("ANY", "FileRead", FileDlgDir, FileDlgFilt, "", 1, FileDlgCaption)

Regards,
Brad Turpin
NI
Message 3 of 5
(5,370 Views)
Thanks for answer !
0 Kudos
Message 4 of 5
(5,370 Views)
Thanks for answer !
0 Kudos
Message 5 of 5
(5,370 Views)