DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

FileDlgShow Undefined Error

Solved!
Go to solution

I can't seem to get the FileDlgShow to work.  I get an error "Variable is undefined: 'FileDlgShow' whenever I try to use it.

I am using version 10.2.  The below is straight from Excercise 5-1 in the Diadem Advanced Course Manual.

 

Option Explicit 

Call DataDelAll(1)                     

DlgState = FileDlgShow("C:\Excercises\DIAdem Advanced\","*.tdm")
If (DlgState = "IDOk") Then
  Call DataFileLoad(FileDlgNameList(0),",")
  Call ChnSmooth("[1]/[2]","/Smoothed",12,"maxNumber") 

  Call ChnPeakFind("[1]/[1]","[1]/Smoothed","/PeakX","/PeakY",5,"Max.Peaks","Amplitude") 

  Call DataFileSave("Results.tdm","TDM")

  Call PicLoad("Smooth_2")               

  Call PicUpdate(0)                      

Else
  Call MsgBoxDisp("Data loading has been aborted!")
End If

0 Kudos
Message 1 of 5
(4,182 Views)
Extra Info : If I take out the Option Explicit the error changes to "Type mismatch: 'FileDlgShow'
0 Kudos
Message 2 of 5
(4,181 Views)
Solution
Accepted by topic author 2Pale4TX

Hello!

 

The FileDlgShow command is not part of DIAdem 10.2. It was implemented later in Version 11. You have to use the bulky FileNameGet command instead.

 

Matthias

Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
0 Kudos
Message 3 of 5
(4,158 Views)

Thanks for your help!

 

I had a similar issue with FileDlgNameList  - is FileDlgFileName the equivalent command?

 

Sherry

System Test Engineer

0 Kudos
Message 4 of 5
(4,155 Views)

Hello Sherry!

 

Yes, you have to use FileDlgFileName. This string will contain all names and you have to split it on the | chracter to get an array.

 

Matthias

Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
0 Kudos
Message 5 of 5
(4,153 Views)