DBWLoadScript

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Library Reference > PDMSystem >

DBWLoadScript

Description

Loads a vbscript file into the global scope.

Syntax

Function DBWLoadScript(FileName)

Parameters

FileName

name of the script file to load

Return values

TRUE

if the script file has been properly loaded

FALSE

otherwise

Remarks

The command looks for script file existence first in shared \LST folder and then in <GlobalParametersPath>

Example

MyLibraryFile.lib

Function doSomethingUseful()
 <Some_common_functionality>
End Function
DataEntr.lst
Sub Main()
 If (DBWLoadScript("MyLibraryFile.Lib")) Then
  doSomethingUseful()
 End If
End Sub

OnEdit.lst

Sub Main()
 If (DBWLoadScript("MyLibraryFile.Lib") ) Then
  doSomethingUseful()
 End If
End Sub