|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Library Reference > Standard Library Global Constants |
This is a list of constants passed from Mechworks PDM to the script.
constant |
return value |
possibile values |
note |
|---|---|---|---|
DBWorksApplicationName |
name of the application |
•"DBWorks" •"DBWorks Standalone" •"DBInventor" •"DBSolidEdge" |
|
DBWorksDllModuleName |
dll module name |
•DBWORKS •DBWALONE •DBInventor •DBSolidEdge |
|
DBWorksCADApplicationName |
name of the hosting CAD |
•"Standalone" •"SolidWorks" •"Inventor" •"Solid Edge" |
|
MWProductName |
The custom service product Name as set by the reseller in the new encrypted file <GPP>\PDMService\CustomerConfigurationData###.par |
||
DBWorksCADApplicationVersion |
version of the CAD in the format: |
e.g. |
|
MechWorksPDMVersion |
version of the PDM in the format |
e.g. |
|
DBWorksConnectionDSN |
data source name of the main database as declared in DBWCONN.PAR |
|
|
DBWorksConnectionDBWCustDSN |
data source name of the categories database as declared in DBWCONN.PAR |
|
if not declared in dbwconn.par the default value is "DBWCUST" |
DBWorksConnectionUID |
User id as declared in DBWCONN.PAR |
|
|
DBWorksConnectionPWD |
Password as declared in DBWCONN.PAR |
|
|
DBWorksConnectionDBMSName |
Name of the DBMS |
•"ACCESS" •"Microsoft SQL Server" •"ORACLE" |
the constant is set after calling the DBWInit function |
DBWorksConnectionORACLE_SERVER |
the name of oracle service |
•"__unknown__" if Oracle not running •name of Oracle service |
may be empty for Personal Oracle |
DBWorksConnectionExcelDSN |
data source name for dbwexcel.xls as declared in DBWCONN.PAR |
|
|
DBWorksConnectionBomDSN |
data source name for dbwbom.xls as declared in DBWCONN.PAR |
|
|
DBWorksIsInBatchOperation |
Type of the operation the script is called by |
1: if the current script is called from within the multiple (recursive) Checkin/Checkout/Approve dialog |
|
DBWorksBatchOperationDocumentsCounter |
value of the counter of documents processed by the multiple Checkin/Checkout/Approve dialog |
|
|
DBWorksCurrentDocumentBatchOperationIndex |
index of the currently processed document in the dialog |
|
the first document has a "1" value |
DBWorksIsx64 |
system on which DBWorks/DBInventor is running on |
0: 32bit system |
typical example: if DBWorksIsx64<>0 then ... |
DBWorksEventScriptType |
EVENT:<event name> |
EVENT: "ONOK", "ONOPEN", "ONSAVE" |
passed to event scripts of type .LST |
DBWorksScriptFullPathName |
The full path name of the script that invoked the constant |
C:\MechWorks_Pdm_Server\lst\Dbwdemo.vbs |
|
DBWorksIsProcessingLinkedDocument |
Type of document the script OnOkRev.LST is called on |
1:OnOkRev.lst is being run on a Linked Document |
The linked document has to be intended as a different file, so the OnokRev.LST won't be called on different configurations |
This is a useful script to print all the above constants;
Sub main()
DBWInit(true)
dbwmsgbox "DBWorksApplicationName: " & DBWorksApplicationName & vbcrlf & _
"DBWorksDllModuleName: " & DBWorksDllModuleName & vbcrlf & _
"DBWorksCADApplicationName: " & DBWorksCADApplicationName & vbcrlf & _
"DBWorksCADApplicationVersion: " & DBWorksCADApplicationVersion & vbcrlf & _
"MechWorksPDMVersion: " & MechWorksPDMVersion & vbcrlf & _
"DBWorksConnectionDSN: " & DBWorksConnectionDSN & vbcrlf & _
"DBWorksConnectionDBWCustDSN: " & DBWorksConnectionDBWCustDSN & vbcrlf & _
"DBWorksConnectionUID: " & DBWorksConnectionUID & vbcrlf & _
"DBWorksConnectionPWD: " & DBWorksConnectionPWD & vbcrlf & _
"DBWorksConnectionDBMSName: " & DBWorksConnectionDBMSName & vbcrlf & _
"DBWorksConnectionORACLE_SERVER: " & DBWorksConnectionORACLE_SERVER & vbcrlf & _
"DBWorksConnectionExcelDSN: " & DBWorksConnectionExcelDSN & vbcrlf & _
"DBWorksConnectionBomDSN: " & DBWorksConnectionBomDSN & vbcrlf & _
"DBWorksIsInBatchOperation: " & DBWorksIsInBatchOperation & vbcrlf & _
"DBWorksBatchOperationDocumentsCounter: " & DBWorksBatchOperationDocumentsCounter & vbcrlf & _
"DBWorksCurrentDocumentBatchOperationIndex: " & DBWorksCurrentDocumentBatchOperationIndex & vbcrlf & _
"DBWorksIsx64: " & DBWorksIsx64 & vbcrlf & _
"DBWorksEventScriptType: " & DBWorksEventScriptType & vbcrlf & _
"DBWorksScriptFullPathName: " & DBWorksScriptFullPathName & vbcrlf & _
"DBWorksIsProcessingLinkedDocument: " & DBWorksIsProcessingLinkedDocument & vbcrlf & _
"MWProductName: " & MWProductName
End Sub