Dials & Gauges Blockset    

Modifying ActiveX Control Properties
You modify ActiveX control properties in one of these ways:

The ActiveX Control Properties dialog box appears, displaying tabs of properties for the ActiveX control that is contained by the selected ActiveX Control block.

Modifying some ActiveX control properties is straightforward. This section discusses how to modify two of the more complicated ActiveX control properties found on Global Majic controls, in the following subsections:

When you modify any properties of an ActiveX control, the ActiveX control is visually updated immediately. However, the changes are not permanent until you select Save or Apply; if you select Cancel, the changes will be undone.

For more information about properties and other characteristics of Global Majic ActiveX controls, see the online help provided by Global Majic. Each Global Majic Control library contains a Help icon that provides online help for that library. This includes a description of property categories and links to additional information, such as properties, events, and methods. To access ActiveX library help, right-click on the library name and select Open library.

Saving a Customized ActiveX Control describes how to save an ActiveX control that you modify.

Modifying the Range Displayed on an ActiveX Control
Changing the range of values displayed on an ActiveX control involves adjusting these ActiveX control properties:

To illustrate how to use these properties to adjust the range of values displayed on an ActiveX control, this example changes the Generic Linear Gauge to display values from -20 to 20, sets the interval between tick marks to 5, and shows the tick mark labels. This figure shows the Generic Linear Gauge with its default settings (left) and with modified settings (right).

Modifying the Scale Properties
Click on the Scales tab to display the scales properties page. This figure shows the default scale properties for the Generic Linear Gauge.

To modify the scale range, change ScaleMax to 20 and ScaleMin to -20.

Modifying the Tick Mark Properties
Click on the Tics tab to display the tick mark properties page. This figure shows the default tick mark properties.

To show tick mark labels, check the Label On/Off check box.

To set the starting and ending tick marks so they mark the minimum and maximum scale settings, set StartValue to -20 and StopValue to 20. Change the DeltaValue property, which sets the spacing between tick marks. A value of 5 is reasonable for default control size.

Modifying the Needle or Pointer Properties
Click on the Pointers tab to display the pointer properties page. This figure shows the default pointer properties.

.

The Value property indicates the current pointer value. Set the initial value to 0, halfway between the maximum and minimum scale values.

Click OK to accept the changes and close the dialog box.

Modifying Multiple Tick Marks
Some characteristics can be repeated in an ActiveX control. For example, a single ActiveX control can display multiple needles or tick marks.

This example illustrates the use of multiple tick marks and the use of the ID property to manage them. This example, instead of modifying an ActiveX control, examines the default settings for a particular ActiveX control.

This figure shows the Amp Meter control. Notice that the tick marks have two different lengths. These are created by defining two sets of tick marks.

The first set consists of 11 longer tick marks, each positioned at one of the label values, positioned at increments of 1.0. The second set consists of five shorter tick marks for each integer change in the scale, positioned at increments of 0.2.

To examine how these tick marks have been created, double-click on the Amp Meter control to display its properties dialog box. Select the Tics tab.

The Tics and TicID properties, in the box labeled 1, are defined as follows:

The Position/Size properties, in the box labeled 2, are defined as follows:

The Range properties, in the box labeled 3, are defined as follows:

The Labels properties On/Off check box, in the box labeled 4, determines whether the labels are displayed. For the first set of tick marks, the labels are displayed.

The FontID property, in the box labeled 5, determines which of multiple fonts defined for this control is used for the label. In this case, two font sets are defined. The first (FontID 0) is for the tick marks, the second (FontID 1) is for the caption, "Amps."

To examine the second set of tick marks, change the TicID property value to 1 by clicking on the up arrow to the left of the value. The Tics page looks like this.

The Position/Size properties, in the box labeled 2, are defined as follows:

The Range properties, in the box labeled 3, are defined as follows.

The Labels properties On/Off check box determines whether the labels are displayed. For this set of tick marks, the labels are not displayed.

Saving a Customized ActiveX Control
To save a modified ActiveX control for later use, follow these steps:

  1. Make the modifications to the ActiveX control.
  2. Select the Library tab of the ActiveX Control Properties dialog box.

  3. On this dialog box, assign a name to the modified ActiveX control by entering a new control name in the Configuration Name field.

  1. To provide textual information about the control, click on the Notes button. This dialog box appears, filled in with sample text.

  2. Enter a description in the text area, then click OK.
  3. Select the directory in which to store the modified ActiveX control by expanding the library hierarchy at the left. The new ActiveX control configuration is stored in the directory you select. Click the Store button, below the Notes field, and then click OK to accept all the changes and close the dialog box.

    The figure below shows the dialog box with fields filled in. The modified ActiveX control configuration will be stored in the Linear Gauge directory.

Following this procedure enables you to save your customized copies of ActiveX controls on your computer. However, this method does not enable you to share these ActiveX control configurations.

To share these ActiveX control configurations, save the model. The ActiveX control configurations are saved in .ax files, which other users can access. You can also export configurations to .gms files for sharing. To do this, select a directory in the directory hierarchy and click Export. You can later use Import to access these configurations.


 Using ActiveX Control Blocks in a Model Advanced Topics