DBWorksApplicationName Property

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Object Reference > DBWPar Properties >

DBWorksApplicationName Property

MechWorks MWScriptGUI Scripting Utility Object

It returns the type of application that is calling the COM object

Syntax

[form!]DBWPar.DBWorksApplicationName[ = value As String ]

Remarks

The return value (case sensitive if used with MwPDMApi) may be
 
"DBWorks Standalone"
"DBWorks"
"Scripting"
"DBInventor"
"Unknown"
 
The value "Scripting" is returned in case you call the COM object directly from a vbs file that has been started with a double click, which is outside external applications.
The value "Unknown" handles external applications not recognized, as for instance calls from inside vba modules of an Excel macro.
 
This property has been added for advanced programming that should consider the external environment before calling direct APIs of external programs, as for instance SolidWorks or Inventor COM methods.
 
An example of API call is:

callingFrom = DBWParObjectInstantiated.DBWorksApplicationName
if callingFrom = "DBWorks" Then ...

Data Type

String

See also