DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does my script end at "PicLoad(PicFile)"?

Hi everybody,

I have a stupid problem - more or less a temporary one, which I don't get. I have this code fragment here:


Call MsgBoxDisp("Soll eine neue Grafik geladen werden?", "MB_YESNO")
If (MsgState = "IDYes") Then
  FileDlgCaption = "REPORT-Grafik laden"
  Call FileNameGet("REPORT", "FileRead", ,"*.TDR", , ,FileDlgCaption)
  If (DlgState = "IDOk") Then
    Call PicLoad(FileDlgDir+FileDlgFile+FileDlgExt)
    Call PicUpdate
  End If
End If
Call GraphSheetInfos
For i=1 to GraphSheetCount
  Call GraphSheetNGet(i)
  GraphSheets_(i)=GraphSheetName
Next
[...]


With or without debug mode, the script ends 9 from 10 times at line 6 (here) - where it says "Call PicLoad(FileDlgDir+FileDlgFile+FileDlgExt)" as if it was the proper end of the script.
When I go by myself into REPORT, the file was loaded. But still - the script does not continue.

I have no clue why!! Is it a bug under Win Vista/32bit DIAdem 10.2??
0 Kudos
Message 1 of 17
(5,902 Views)
Hello Yeti!
 
Please take a look into the DIAdem log file. Sometimes errors are not reported on the UI.
 
BTW 1: Why don't you use 'FileDlgFileName' in PicLoad()?
 
BTW 2: It's a good practice in VBS to concat values with '&' to get a string value. Otherwise the result is sometimes suprising if values are no strings (not in your case!).
 
 
Matthias
Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
0 Kudos
Message 2 of 17
(5,886 Views)
Hello Matthias!!

Thanks for the answer! And for the hint with the log. It reports an error, but the message doesn't help me very much:
  
"206 12:28:47 Fehler:
  Bei der Ausführung des Befehls "PICLOAD("S:\DIAdem\Gra\DR-Aut.TDR")" ist ein Laufzeitfehler aufgetreten.
  Fehlerart : ACCESS VIOLATION
  Fehleradresse : 00075292
  Modulname :gfsdesk.DLL
207 12:28:47 Fehler:
  Fehler in (Zeile: 82, Spalte: 7):
  Bei der Ausführung des Befehls "PICLOAD("S:\DIAdem\Gra\DR-Aut.TDR")" ist ein Laufzeitfehler aufgetreten.
  Fehlerart : ACCESS VIOLATION
  Fehleradresse : 00075292
  Modulname :gfsdesk.DLL"
(line 82 is right: there the PicLoad-function is placed)

- especially as it all worked out before and I don't remember having done any changes on this part.
Does this code number tell you anything? Or should I better contact the hotline?

Since yesterday night I found a new unbeautiful thingie: everytime I have the KeyWait()-function running and click anywhere into DIAdem with mouse (I have to be sure my colleagues can't spoil anything ;-), DIAdem totally crushes down!
Did that happen before...?


Concerning FileDlgFileName:
I had started with that one. But for some reason it sometimes gets the path to the file, sometimes not. As I'm working on different directories, I prefer the "long version" as it's now. It is more resistable against that mistake.

Concerning "+" and "&":
Usually I use the "&" - the "+" is "leftover" of some workaround to find out why the script stopped... But as you mentioned: in this case it doesn't matter which symbol is in use. 😉
0 Kudos
Message 3 of 17
(5,881 Views)
Hello Yeti!
 
AV are verry bad! Can you please ensure that you have the latest DIAdem SP (10.2.1f3219) installed. If not please install it and try again, otherwise please start a new thread here with a subject like 'Access violation in PicLoad' and attach an example TDR file.
 
I can't reproduce the KeyWait crash.
 
Matthias
Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
0 Kudos
Message 4 of 17
(5,879 Views)
Oh dear... I have v10.2.0.f3031 installed. And a CD lying around here. Where do I have to look which version (except from "10.2" ) is on that CD? I didn't find it so far.

And if it is the same, how do I get the update/SP? The CD was delivered last week.
0 Kudos
Message 5 of 17
(5,874 Views)
Hello Yeti!
 
Search for a 'setup.ini' file in the DIAdem install directory and open it in a text editor. In line 5 is something like 'Version=10.2.1'.
 
You can get the SP from the NI Support Page. Look for Updates -> Software -> DIAdem -> 10.2 + SP1.
 
Matthias
Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
0 Kudos
Message 6 of 17
(5,870 Views)

Hi again and thanks!!

It's 10.2.0.

I found the update link here. But do I need the licence number again or so?
As it says I'd have to deinstall 10.2.0 to reinstall 10.2.1.
Our Admin is ill currently. And I don't know where he has it.

0 Kudos
Message 7 of 17
(5,868 Views)

Hi Yeti,

When I go through a minor upgrade like 10.2.0 to 10.2.1, I do not need to provide the license information-- rather, the first time I launch the new version I get a dialog to the effect of "we found a license file that should work for this DIAdem version, would you like to apply it?", then I hit <OK> and never have to mess with activation again.  I don't use a serial number, but I expect you will still have this same experience.

I was looking at your file paths in the error log and noticed that you have "DIAdem\Gra", which used to exist in all previous DIAdem versions but no longer exists in DIAdem 10.2.x and later (thanks to VISTA).  Have you manually created this directory under DIAdem 10.2?

Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 8 of 17
(5,857 Views)
Hi Brad,

Thanks, that's great news!! Then I can try to do the installation myself and hope that it'll help.

Hehe, concerning the path - yes, it's been me creating the DIAdem directories. That "S"-directory is our data network directory with measurement data of a lot different devices. For everyone having the script and graphs (at least the templates) available, I decided to put them there centrically. And as I so-to-say grews up with DIAdem (learned on v4), it was clear I need those directories.... 😉
0 Kudos
Message 9 of 17
(5,848 Views)
Dang!
Didn't help 😞

"246 18:22:23 Fehler:
  Bei der Ausführung des Befehls "PICLOAD("S:\DIAdem\Gra\DR-Aut.TDR")" ist ein Laufzeitfehler aufgetreten.
  Fehlerart : ACCESS VIOLATION
  Fehleradresse : 00075292
  Modulname :gfsdesk.DLL
247 18:22:23 Fehler:
  Fehler in (Zeile: 82, Spalte: 7):
  Bei der Ausführung des Befehls "PICLOAD("S:\DIAdem\Gra\DR-Aut.TDR")" ist ein Laufzeitfehler aufgetreten.
  Fehlerart : ACCESS VIOLATION
  Fehleradresse : 00075292
  Modulname :gfsdesk.DLL"

OK, I'll open a new thread as Matthias proposed.

Anyway, a lot thanks to you two!!
0 Kudos
Message 10 of 17
(5,842 Views)