Adding Windows Script Components

Use this for the Ansys Orbit Determination Tool Kit (ODTK®) application to support tracking data file providers. After you create your custom script using the Windows Scripting Component method, use the Plugins tab of the Options window, accessible from the Tools menu, to add it to the ODTK application:

  1. Register the script by opening the Command Prompt window, go to the folder where the plugin is stored, and enter regsvr32 <plugin name>. For example, if the plugin is named WscVbsCOBTrackingDataPrv.wsc, enter:
    regsvr32 WscVbsCOBTrackingDataPrv.wsc
  2. In the Plugins tab, click Add... to add a new line to the Tracking Data Files Providers list.
  3. Double-click the first field in the new line, Extensions, and list the file extension(s) to which the new script will apply. If more than one extension is listed, separate them with semicolons (;).
  4. Double-click the second field, Description, and add a brief description of the measurement file type(s).
  5. Double click the fourth field, PluginID, and enter the plugin file name (e.g., WscVbsCOBTrackingDataPrv.wsc) of the plugin script.

    The progid must be the same as the file name for the plugin to work properly.

  6. If you wish to use the new file type as a default, select it in the list and check the "Set as Default" box.

Regsvr32.exe requires administrator rights in order to register a plugin. Once registered, it is available to all users on that machine, provided that the actual file location on the disk does not change. It's sometimes difficult to find a system administrator to register the plugin though. In this case, there is a VBScript utility "register_wsc_hkcu.vbs" located in your install under <Install_Dir>\CodeSamples\Extend. The utility will register a Windows Script Component to the HKEY_CURRENT_USER area of the Windows registry rather than HKEY_LOCAL_MACHINE. To run the utility, open up a command prompt and change directories to the location of the utility. Then enter

cscript register_wsc_hkcu.vbs "Your WSC Name.wsc"

replacing "Your WSC Name.wsc" with the actual full path to the location of your Windows Script Component (WSC) file. The utility will parse your WSC file and make the appropriate entries into the Windows registry. You must run this utility for each user on the machine who wants to use that plugin.