Automation Mode

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Programmer's Guide > DBWorks StandAlone Server >

Automation Mode

In order to improve product usability and license management, by default the Standalone automation instance is now created with no user interface and without license usage to access the powerful API/Shell features.

With the new behavior, a typical custom usage is:

Set DBWAloneApp = CreateObject("DBWAlone.Api")

DBWApp.Callback("@StartApplication")
' all possible code...
DBWAloneApp.CallBack("@EndApplication")

where the new "@EndApplication" callback is called to ensure a cleanup process termination.

In case of user interface requirement via automation, after the CreateObject, the new "@SetVisible" callback must be invoked:

Set DBWAloneApp = CreateObject("DBWAlone.Api")

DBWAloneApp.CallBack("@SetVisible")
DBWApp.Callback("@StartApplication")
' all possible code...

In case of interactive usage (based on license acquirement) via automation, after the CreateObject, the new "@SetInteractive" must be invoked:

Set DBWAloneApp = CreateObject("DBWAlone.Api")

DBWAloneApp.CallBack("@SetInteractive")
DBWApp.Callback("@StartApplication")
' all possible code...

With the new "@SetInteractive" callback, the Standalone automation instance becomes automatically visible and it is possible to access any command menu or browser functionalities interactively.