DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

scriptstart error: file does not exist

Solved!
Go to solution

Hi all,

 

I'm using the ScriptInclude and ScriptStart commands to modularize my post processing code.  All my scripts are saved in a workspace.  Often, a script that was working will throw the error:

 

     Error in <PDP - Top Level.VBS> (Line: 8, Column: 1):

     The VBS script <Define Globals - PDP.VBS> does not exist!

 

despite the supposedly non-existent script not only being, in fact, a thing which exists but also a thing that is open and visible at the time the error occurs.  There's a screenshot attached.

 

Anyone seen this issue?  Any suggestions? 

 

Thanks,

Scott

CLAD
0 Kudos
Message 1 of 4
(4,610 Views)

Hello testingHotAir,

 

I'm a bit baffled by the error as I'm sure you are as well.  You may want to consider using ScriptInclude instead of StartScript in your code.  Please review the following article which outlines when best to use each function.  I would see if this causes the error to go away.

 

Command: ScriptStart

http://zone.ni.com/reference/en-XX/help/370859H-01/comoff/scriptstart/

 

Best of luck!

Regards,

Shawn S. | NIC
Instrument Driver/IVI PSE
National Instruments
0 Kudos
Message 2 of 4
(4,589 Views)
Solution
Accepted by topic author testingHotAir

Hi Scott,

 

You should provide the full path to the VBScript file you want to call with ScriptInclude or ScriptStart-- you are taking pot luck by referencing the file name only.  These functions have no knowledge of what scripts you have open in the SCRIPT panel editor, and in fact you can have multiple files with the same name open in the SCRIPT editor at the same time (which come from different folders).  Try this, place all your script files in the same folder, then add the full path in programmatically with the AutoActPath global variable, which always contains the folder of the currently running top-level script file:

 

Call ScriptInclude(AutoActPath & "MyFileName.VBS")

Call ScriptStart(AutoActPath & "MyFileName.VBS")

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 3 of 4
(4,585 Views)
Hi Brad, That seems
CLAD
0 Kudos
Message 4 of 4
(4,566 Views)