Admin Production ni-theme
Current Publication

Setting Advanced Options

LabWindows/CVI

Create ActiveX Controller Wizard — Advanced Options Panel

Use the ActiveX Controller Advanced Options dialog box to select the objects you want to include in the instrument driver and to change the names of the functions and properties that the wizard generates. Selecting a large number of server objects results in large source files and longer compile times.

Refer to your server documentation to determine which objects you want to use. Many servers provide online help that you can access from this dialog box. Context-sensitive help buttons are labeled with a question mark and display help for the server, object, method, or property. If the server does not provide help for an item, the corresponding context-sensitive help button is dimmed.

The ActiveX Controller Wizard generates various types of functions. You can use a method function to invoke a method of an object. The driver contains a separate method function for each method of each object. You can use the object creation functions to create top-level objects. After you have created a top-level object, you can create other objects using the property and methods functions. The number of creation functions for each top-level object depends on the type of the object.

Based on what you choose in the Property Access Functions control in the Compatibility Options dialog box of the ActiveX Controller Wizard, the wizard generates either individual functions to get and set each property in the server or one or more sets of get and set property functions. If the wizard generates get and set property functions, you use a property constant to identify a specific property to a property function. By default, the wizard generates individual functions to get and set each property in the server.

LabWindows/CVI concatenates the instrument prefix, an object tag, and a property or method tag to create each constant name and method function name in the instrument driver. You can specify the object, method, and property tags, but the dialog box provides default values. The default value for a tag is the object name, method name, or property name that the server object library defines.

Given the size of object and method names in some servers, some of the function names suggested in the ActiveX Controller Advanced Options dialog box can be very long. However, the function panel file format imposes a limit of 79 characters, excluding the instrument prefix and underscore. In addition, the ActiveX Controller Wizard imposes a limit of 79 characters on property constants, excluding the instrument prefix and underscore. Because of character limits, it might be necessary for you to edit the object, property, and method tags to make the function names and property constants smaller. To assist you, the dialog box flags names that are too long. The dialog box also automatically abbreviates object, property, and method tags for common ActiveX servers, such as Microsoft Excel 8.0. If you have names that are too long, abbreviate object tags before abbreviating property and method tags. Because LabWindows/CVI does not include the instrument prefix in the name length limit, abbreviating the instrument prefix does not allow you to have longer property, method, or object tags.

The ActiveX Controller Advanced Options dialog box contains the following options.

  • Instrument Prefix—Contains the instrument prefix for the generated ActiveX Controller instrument driver. You must either leave the control empty or enter a valid C identifier.
  • Objects in ActiveX Server—Displays the objects in the ActiveX server. Indicate the object(s) to include in the generated instrument driver by placing a check next to them.

    The second column of this list box indicates which objects are top-level objects or event objects. For each selected top-level object, the wizard generates one or more of NewObject, OpenObject, and ActiveObject functions. You must use one of these functions to create an ActiveX object before you can use any of the other functions in the instrument driver. Create all other objects in the ActiveX server through methods and properties of the top-level objects.

    ActiveX servers specify the events they generate as a collection of methods in an event object. For each event object you select, the wizard generates a set of functions you can use to register callbacks for each event. LabWindows/CVI calls the callbacks when the server generates the events.
  • Object Tag—The tag associated with the currently selected object. LabWindows/CVI adds this tag to the method and property tags to create the method function and property constant names. This string must contain only valid C identifier characters.
  • Object Description—A description of the currently selected object. Some ActiveX servers do not provide this description.
  • Method Names Too Long—The number of methods of the currently selected object with generated function names that are longer than 79 characters. LabWindows/CVI constructs a method function name by appending the Method Tag to the Object Tag. You can reduce the length of a method function name by editing the Method Tag or Object Tag.
  • Property Names Too Long—The number of properties of the currently selected object with generated constant names that are longer than 79 characters. LabWindows/CVI constructs a property constant name by appending the Property Tag to the Object Tag. You can reduce the length of a property constant name by editing the Object Tag or Property Tag.
  • Methods/Properties—Displays the methods or properties of the selected object. Click the arrow to select whether the list box below the ring control displays method or property names.
  • Methods of Object—Contains the method names of the currently selected object. The name too long message appears to the right of methods that yield function names that exceed 79 bytes.

    If you choose Per Property in the Property Access Functions control in the Compatibility Options dialog box of the ActiveX Controller Wizard, this box also displays the get and set functions for the properties.
  • Method Tag—LabWindows/CVI appends this string to the Object Tag to construct the function name for the currently selected method. This string can contain only valid C identifier characters.
  • Method Description—A description of the currently selected method. Some ActiveX servers do not provide this description.
  • Function Prototype—The prototype of the function to be generated for the currently selected method. This prototype does not include the function return type and calling convention.
  • Properties of Object—Contains the property names of the currently selected object. The name too long message appears to the right of properties that yield function names that exceed 79 bytes. Select Properties to view a list of properties.

    If you choose Per Property in the Property Access Functions control in the Compatibility Options dialog box of the wizard, then the Methods of Object list box shows the Get and Set functions for the properties, and this list box is empty.
  • Property Tag—LabWindows/CVI appends this string to the Object Tag to construct the generated name for this property. This string can contain only valid C identifier characters.
  • Property Description—A description of the currently selected property. Some ActiveX servers do not provide this description.
  • OK—Accepts the changes you made and closes the ActiveX Controller Advanced Options dialog box.
  • Cancel—Discards the changes you made and closes the ActiveX Controller Advanced Options dialog box.
  • Help—Displays help for this dialog box.