DIAdem Script Shortcuts Do Not Work

Updated Jan 11, 2018

Reported In

Software

  • DIAdem Full
  • DIAdem Base

Issue Details

I am using the DIAdem software shortcut F1, to specify the path to the script. When using this shortcut, the following error occurs:
  Error in script line: Variable definition file “TEXT2DIA” not found in script path.
However, if I have the script already open, F1 works as expected. But opening the script in the operation every time is very troublesome.

Solution

The reason DIAdem is able to resolve the problem after running the script from the file is because DIAdem is provided the complete path in this circumstance. It then caches this complete path to system memory, preventing the error when you call the script after running from file. 

This is expected behavior and there are two ways to solve it .
  • Using the currentscriptpath variable to create an absolute file path.
So when referencing a file such as a User Dialog Box File, it is best to use the complete file path instead of a relative file path. So it is practical to use the currentScriptPath variable to making the call. For example you could call a SUD from the script by using the line: ​
​Call SUDDefLoad(currentScriptPath & "Example.sud")
  • Save the script file to the public DIAdem's Documents folder 
For example, if the software installation path is C driver ,than save the script file under this path:
C:\Users\Public\Documents\National Instruments\DIAdem 2015 (32-bit)\Documents
This way can resolve most problem like this
 

WAS THIS ARTICLE HELPFUL?

Not Helpful