MWAutoNumber for MechWorks PDM Automation.
Appendix D: Custom Scripting – DataEntr_PostEvent.LST example
.VBSCRIPT '.x64
Dim EventType 'NOTE: To cancel from this script, call "CancelCustomScript" Sub Main() '---------------------------------------------------------' '------------DO NOT CUSTOMIZE THIS SECTION----------------' '---------------------------------------------------------' DBWInit( TRUE ) '-------Load the libraries--------' If DBWLoadScript( "DataEntr.LIB" ) = False Then
DBWMsgBox "Script not found or error in script: DataEntr.lib" Exit Sub
End If
If DBWLoadScript( "MwAutoNumber.LIB" ) = False Then
DBWMsgBox "Script not found or error in script: MwAutoNumber.lib" Exit Sub
End If '-----------------------------' '---------Input All Values----------' If Not LoadAllInput() Then Exit Sub End If
'---Call Any MwAutoNumber Prep and loading----' Call MwAutoNumber_Prep() 'Can we create the autonumber object? ok = SetMwAutoNumberApplicationObject() If Not ok then
msg = "ERROR: Unable to load local MwAutoNumber application." msg = msg & vbCrlf & "Please install the MwAutoNumber application to continue." DBWMsgBox(msg) Exit Sub End If Call MwAutoNumber_CustomScriptLoad() '---------------------------------------------'
'Load the values output by the main script Call LoadPostEventValues()
40136 Bologna Italy
www.mechworks.com
123
Made with FlippingBook - Online Brochure Maker