|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Programmer's Guide > .NET scripting > Getting started with .NET scripting |
MechWorks Command Shell [OBSOLETE PAGE]
This content is considered obsolete and it is kept for reference on legacy systems only
New installation must refer to the topic .NET API
.NET scripting is supported in Mechworks products starting from R10 released.
On latest software version, the user can start running .CS and .VBnet script with no maintenance action, on earlier verison a procedure had to be performed to initialize the environment. Here you can find reference about it.
At the moment demo script provided with distributed system are placed in LST\DEMO_LST\ folder:
•OnOk.LST.CS
•OnOk.LST.VB
The native x64 support for .NET scripts is available starting from R12 release.
This means that any .CS or .VB script will no more be executed through the 64-32bit server DBWScriptCOM.exe, but natively executed in 64bit mode.
Q.What have I to do to make the demo scripts run?
You simply have to make sure in the DBWORKS_SERVER\LST\ folder there's no OnOk.LST script file, copy demo scripts from DBWORKS_SERVER\LST\DEMO_LST to LST folder and enable the option
Data Input→
Use OnOk.LST script when pressing OK
Q.Should I rewrite every .vbs script in vb.net?
No. We suggest to port only important/big projects that require debug capabilites provided by a Visual Studio IDE only
Please conside tha VBS is run by Windows Scripting Host and doesn't require compiling, while .NET scripts use precompiled resources that are slower in starting run (and often require the CAD restart to take place).
Q.How to use shell commands?
At the moment the porting of the whole lib is partial, so not every function is available for .NET scripting.
For available commands the syntax for recalling them is
MW.DBWLib.<functionName>