Scriptable Object Component

Although Mathcad has several application-specific components, you can exchange data between a Mathcad worksheet and any other application, as long as that application supports OLE Automation. The Scriptable Object component allows you to control any OLE application, including Mathcad, installed on your computer. Before using the Scriptable Object component, you should be proficient in a supported scripting language and understand how the other application has implemented OLE.

Inserting a Scriptable Object Component

When you insert a Scriptable Object component the Scripting Wizard launches to guide you through the configuration process.

On the first page of the Wizard you must select the object to script. You can either create an empty component or create one based upon a particular application file.

The second page of the Wizard allows you to specify the scripting language used by the component. Although you can script objects using any scripting language available on your computer, Mathsoft officially supports two scripting languages, VBScript and JScript. If you select either of these options, Mathcad creates a script shell containing the appropriate event handlers. For any other scripting language, Mathcad creates an empty script.

On the third page of the Wizard, you can specify a name for the object. You use this name in the script to refer to the object when calling its automation interface. You can also specify the number of input and output variables associated with the component.

Note:

Configuring A Scriptable Object Component

Right-clicking on a Scripted object and selecting Properties allows you to set the number of input and output variables, change the name of the object, and edit the script associated with the component. When configuring the component, keep the following limitations in mind:

Scripted objects can be exported for reuse, allowing you to insert them in other worksheets or distribute them to other users.

The Developer's Reference provides more information about the Scriptable Object component.

Note:

QuickSheet

Related Topics