Referencing type libraries

‘To access a COM-enabled application, you must create a reference to its type library. This reference tells Dexterity where to look for the necessary COM information as you are developing your application. You can add a library reference once for an entire dictionary, or you can add a reference that applies only to the current script.

Adding to a dictionary

Use the Library Definition window to add a COM type library reference to the current dictionary.

  1. Open the Library Definition window.

In the Resource Explorer, choose Libraries in the Base group for the current dictionary. Click the New button in the Resource Explorer to create a new library reference.


  1. Select the library type.

Choose COM Type Library as the library type to be added.

  1. Select a registered type library or type library file.

Click the Name lookup button to open the COM Type Libraries window, which lists all of the type libraries that have been registered on the current machine. Select the appropriate library and click Select.


If the type library file hasn’t been registered, click the Path lookup button in the Library Definition window. Use the File dialog to select the type library file for the application you want to reference.

  1. Save the type library reference.

Click OK to save the type library reference.

Once the type library reference has been added to the dictionary, the Data Type Definition window, and all scripts in the application will be able to access the information in the type library.

Adding to a script

To add a type library reference to a specific script, you will use the import statement. This statement creates a reference to the specified type library file, allowing the current script to access the methods, properties, and other items described in the type library file.

Typically, you would use the import statement only if you were using the COM functionality in a limited number of scripts in your application, or were using pass-through sanScript. In all other cases, we recommend creating a type library reference for the entire dictionary.


Documentation Feedback