Your Ad Here

Prototyping in VBScript

You may also want to prototype with VBScript and then port the code to Visual Basic. If you are comfortable using VBScript but would like to protect your intellectual property, this allows you the perfect way to create a compiled version of a VBScript.

This is a possible workflow for prototyping with VBScript and compiling in Visual Basic:

1. Write your code in VBScript. You can do this either inside XSI (using the Script Editor) or in an external package. You can even browse the XSI type library inside Visual Basic for Applications (see Loading the XSI Type Library into the VB Object Browser).

2. In the XSI Script Editor, run your code and debug it. This is an easy way to make sure that your code works inside XSI before you try to hook into XSI.

3. In Visual Basic, create a shell script that hooks into XSI and does something basic like logging a simple message. For information on setting up your project and compiling an ActiveX .dll, see Writing VB Code that Hooks into XSI.

4. Once your connection works, insert the VBScript code into your VB project. For the most part, this transition should be a matter of cutting and pasting, since VBScript is a subset of Visual Basic.

5. Compile your project again and install it in XSI to debug it.

 



 

Return to Softimage XSI Index


Your Ad Here