Instruments Panel Documentation

Introduction

Contains an overview about the features of the Instruments Panel.

Using the Instruments Panel

Contains procedures for creating Instruments Panels, and describes the general handling of the Instruments Panel.

Controls

Contains an overview about all available display and control elements that can be used in a Instruments Panel.

Reference

Contains reference topics about the menus and dialog boxes of the Instruments Panel, and information about the Instruments Panel object model.

Last update: 2021-04-29

Send Feedback | Copyright © 2021 PEAK-System Technik GmbH. All rights reserved.


Introduction

The Instruments Panel is a PCAN-Explorer Add-in to visualize or modify Signal values graphically. You can choose from a variety of Display and Control elements, which can be freely arranged on a panel, and can be customized in their appearance and behavior.

An Instruments Panel can contain several "scenes" that represent different configurations of the Instruments Panel. At runtime, an automatic switching between the scenes can be performed. The switching can be controlled by assigning a signal to the panel, and by assigning threshold values to the scenes.

By using Control elements on a panel, you can change Signal values. By changing Signal values, CAN messages can be transmitted automatically to trigger actions or change parameters of control modules that are connected to the bus.

What do you want to know more about?

  • Using the Instruments Panel

  • Table of available Display and Control elements

See also

Home page Instruments Panel Documentation


Using the Instruments Panel

Using the Instruments Panel

This section explains the basic procedures for working with the Instruments Panel Add-in.

What would you like to do?

  • Create a panel and panel controls

  • Customize control properties

  • Link a control to a Signal

  • Switch between the Design mode and the Run mode

  • Add a Scene or switch between Scenes

  • Save a finished panel or load a previously saved panel

  • Customize settings for the Instruments Panel Add-in in the PCAN-Explorer environment


Creating a Panel and Panel Controls

A Panel is a work space or a window in PCAN-Explorer. When it is created in the beginning, it is just an empty window. Only a layout grid and a status bar at the bottom edge is visible. You can then begin to equip it with controls, which can be placed freely within the Panel area.

To create a new Instruments Panel

  1. In the File menu of the PCAN-Explorer, select New File from the New sub-menu.

  2. In the New File dialog box, select the Instruments Panel File entry and confirm with OK.

To add a new control to the panel

  1. In the Tools menu, open the Instruments Panel sub-menu.

  2. Select the on of the Create... commands.

- or -

  1. On the Instruments Panel toolbar click on a desired control icon.

- or -

  1. Open the context menu by right-clicking with the mouse on the empty area of the panel.

  2. Select the Insert Object command.

  3. Select the desired control from the list.

Note

If no Instruments Panel is opened yet, the first two steps create a new Instruments Panel automatically.

See also

Saving and Loading an Instruments Panel

Home page; Using the Instruments Panel


Customizing Control Properties

Customizing the properties of controls is only possible in the Design mode.

Controls can then be moved on the panel by dragging it with the mouse. The size of a selected control can be changed by dragging the handles on the selection frame with the mouse.

Note

The position and size of controls can also be modified using the keyboard. To move one or more selected controls, press [Ctrl+Arrow key]. To resize selected controls, press [Shift+Arrow key].

Other properties, e.g. like the color or font of a control, can be modified in the PCAN-Explorer Properties window. Select one or more controls using the mouse, then adjust the property values in the Properties window.

To select a control, just click on it with the mouse. To select an additional control, hold down the [Ctrl] key while clicking on the other control. To select multiple controls, you can also click somewhere on the panel background, and then, while keeping the left mouse button pressed, open a selection rectangle. All controls that are located fully or partly within the selection rectangle while releasing the mouse button will be selected.

See also

Reference

Home page; Using the Instruments Panel


Controls and Signals

In order to visualize data or to pass on data to a CAN bus, controls must be linked to Signals. In PCAN-Explorer, Signals are defined in Symbol files. You can find further information about Signals in the PCAN-Explorer documentation.

To link a Signal to a control using drag-and-drop:

  1. If not done yet, open the Project Manager of PCAN-Explorer. To do this, open the View menu, and select the Project Manager command.

  2. Select the Project Items tab in the Project Manager.

  3. Expand the Signals tree node in the Project Manager and move the mouse cursor over the desired Signal.

  4. Press the left mouse button (the Signal is highlighted) and keep it pressed.

  5. While keeping the mouse button pressed, move the mouse cursor onto the desired control.

  6. Release the mouse button.

To link a Signal to a control using the control's context menu:

  1. Move the mouse cursor over the desired control.

  2. Press the right mouse button to open the context menu.

  3. Choose the Select Signal command.

  4. Select a Signal and confirm the selection with OK.

When the control has been successfully linked to a Signal, the controls's value range is not automatically adapted according to the Signal's Min and Max properties.

To manually adapt the value range of a control to the value range of a Signal:

  1. Display the properties of the control, for example by selecting the Properties command from the control's context menu.

  2. Under Value Settings, click in the cell that contains the Maximum value.

  3. Within the cell click on the ... button, which automatically adapts the Maximum value of the control to the Max property of the signal.

  4. Do the same for the Minimum value.

See also

Signals (PCAN-Explorer help)

Home page: Using the Instruments Panel


Switching between Design mode and Run mode

The design mode is used for the positioning and configuration of Display and Control elements in the Panel. In this mode, not all instruments will work correctly. Pressing the [Tab] or [Shift+Tab] keys moves the selection frame between the instruments.

When the Instrument Panel is set into the Run mode, all Display and Control elements will work correctly. Also, the Layout grid is no longer visible, and the Status bar at the bottom edge of the Panel window is hidden. All instruments are protected against unintentional changes of their properties. Pressing the [Tab] or [Shift+Tab] keys moves the input focus between the Control elements (active instruments).

To set an Instruments Panel into the Run mode

  • On the Instruments Panel toolbar click on the [image] button.

- or -

  • In the context menu, select the Run Mode command.

To set an Instruments Panel into the Design mode

  • On the Instruments Panel toolbar click on the [image] button.

- or -

  • In the context menu, select the Design Mode command.

If an Instruments Panel is saved to a file, also the current mode is saved in the file.

See also

Reference

Home page: Using the Instruments Panel


Adding or Selecting Scenes

A Scene represents a certain configuration of the Instruments Panel. Miscellaneous Scenes can be created within a Instruments Panel, and in the Run mode the Scenes can be switched automatically via a Signal.

To add a new Scene

  1. If not done yet, activate the Design mode.

  2. In the context menu of the Panel (hit the right mouse button on a free area of the Panel), select the Add Scene command.

To select a Scene for editing

  1. If not done yet, activate the Design mode.

  2. In the context menu of the Panel (hit the right mouse button on a free area of the Panel), in the Scenes submenu, select the Scene that you want to edit.

- or -

  2. Change between Scenes by pressing the [Page-Up] or [Page-Down] keys on the keyboard.

To delete a Scene

  1. If not done yet, activate the Design mode.

  2. In the context menu of the Panel (hit the right mouse button on a free area of the Panel), in the Scenes submenu, select the Scene that you want to delete.

  3. In the context menu of the Panel, select the Remove Scene command.

See also

Reference

Switching between Design mode and Run mode

Home page: Using the Instruments Panel


Saving and Loading an Instruments Panel

Instruments Panel files have the file name extension .ipf (Instruments Panel File).

To save an Instruments Panel

  1. From the File menu, select the Save As... command.

  2. Select a folder and enter a name for the Panel file. The file name extension .ipf is appended automatically to the entered file name.

  3. Press the OK button.

To load an Instruments Panel

  1. From the File menu, select Open.

  2. Choose a Panel file and press OK.

See also

Settings in the PCAN-Explorer Environment

Home page: Using the Instruments Panel


Settings in the PCAN-Explorer Environment

In the PCAN-Explorer environment, you can configure a library directory for Instrument Panel files (file name extension .ipf). All Panel files that are stored in this directory will be listed in the Library window of PCAN-Explorer, so that it is easier to access these files.

Changing the library directory for .IPF files:

  1. From the Tools menu, select Options.

  2. Select the Library page.

  3. The Library Directories table contains the Instruments panel file (.ipf) entry. Set the desired directory for .ipf files in the Path column. If no entry is indicated here, the default directory in the Windows environment for the current user ("Documents" or similar) is used.

See also

Saving and Loading an Instruments Panel

Home page: Using the Instruments Panel


Display and Control Elements

Display and Control Elements

The Instruments Panel has a variety of Display and Control elements that can be placed on a panel. The Display elements can be called passive instruments, and the Control elements can be called active instruments.

Passive instruments display values of signals continuously. With active instruments (e.g. Dial control), signal values can be adjusted manually.

The passive instruments are:

Icon

 Element Description

Value Indicator

Displays a signal value digitally.

Bar Graph

Displays a signal value as a horizontal bar, without a scale.

Vertical Bar Graph

Displays a signal value digitally and as a horizontal bar, without a scale.

Horizontal Bar Graph

Displays a signal value digitally and as a vertical bar, without a scale.

Analog Meter 120°

Displays a signal value with a pointer on a scale which covers an angle of 120 degrees.

Analog Meter 180°

Displays a signal value with a pointer on a scale which covers an angle of 180 degrees.

Analog Meter 270°

Displays a signal value with a pointer on a scale which covers an angle of 270 degrees.

Analog Meter 360°

Displays a signal value with a pointer on a scale which covers an angle of 360 degrees.

Vertical Analog Meter

Displays a signal value digitally and with a pointer on a vertical scale.

Horizontal Analog Meter

Displays a signal value with a pointer on a horizontal scale.

LED

Displays a signal value with only two states. High and Low levels are defined by setting a threshold value (without a hysteresis).

Trend

Displays the course of a signal, like in a Line Writer.

Label

Displays a static text or the value of a signal. Signal values can be displayed decimally, hexadecimally, or binary.

Moreover, the Label is the only instrument that can display Signals that have the "String" data type.

Bitmap List

Displays a single Bitmap from a collection of Bitmaps, depending on a signal value.

The active instruments are:

Icon

 Element Description

Button

Sets a signal when pushing and/or releasing the button. Optionally, a selected PCAN-Explorer command can be executed.

The button can only be pressed when the panel is in the Run mode.

Vertical Slider Control

Manipulates a signal value with a vertical slider.

Horizontal Slider Control

Manipulates a signal value with a horizontal slider.

Dial Control

Manipulates a signal value a rotary knob.

Toggle Switch

Switches a signal between two values with a toggle switch.

Rocker Switch

Switches a signal between two values with a rocker switch.

Value Edit

Allows the direct input of signal values in the panel.

Picture

Displays a graphic. The following file types are supported:

  • Portable Network Graphics (*.png)

  • JPEG Image File (*.jpg, *.jpeg)

  • Bitmaps (*.bmp)

  • Icons (*.ico)

  • Enhanced Meta File (*.emf)

  • Metafiles (*.wmf)

Sets a signal when pushing and/or releasing the mouse button on the picture.

The following elements do not display or change signal values:

Icon | Element | Note
 | Clock | The system time of the PC is used to display either the current time, date, or time and date.
 | Shape | Displays a shape. The available shape types are: circle, ellipse, rectangle, rounded rectangle, square, and rounded square.

See also

Instruments Panel Documentation


Reference

Reference

This section contains information about menus dialog boxes as well as the Instruments Panel object model.

In this section

Menus and Dialog Boxes

Contains reference topics for different menus and dialog boxes of the Instruments Panel.

Instruments Panel Object Model

Lists all objects, properties, methods and events which are available for the automation of the Instruments Panel.


Menus and Dialog Boxes

The help topics about menus and dialog boxes are usually displayed by pressing the [F1] key in the program. You can find all reference topics listed in the table of contents.

Hint

While this topic is shown, press the Locate button in the toolbar of this help window to quickly get to the Reference chapter in the table of contents.


Controls Context Menu

By performing a right click on a control, a context menu is shown that contains the following commands. Depending on the control, some commands may not be selectable.

Run Mode

Activates the Run mode. In the Run mode, the states of the control's properties are frozen. The appearance and the functional properties cannot be changed anymore. This also includes the positioning of the individual controls. Some elements of the panel cannot be used correctly if the panel is not in the Run mode.

Design Mode

Activates the Design mode. In the Design mode, you can position Display and Control elements on the panel, and configure their properties.

Select Signal...

Opens a dialog box that contains a list of all available Signals, which can be linked to the instrument. You can select one of the Signals from the list and link it to the control by pressing OK.

Hint

Signals can also be linked to a control by dragging it with the mouse from the PCAN-Explorer Project Manager onto a control.

Clear Signal

Removes the Signal that is linked to the control.

Cut

Copies the selected controls to the Clipboard and then removes them from the panel.

Copy

Copies the selected controls to the Clipboard.

Delete

Deletes the selected controls from the Instruments Panel.

Bring to Front

Brings a selected passive control in front of all other passive controls, or brings an active control in front of all other active controls.

Hint

Active controls are always located in front of passive controls.

Send to Back

Brings a selected passive control behind all other passive controls, or brings an active control behind all other active controls.

Hint

Active controls are always located in front of passive controls.

Fit to Image

Adjusts the size of an Image element or Bitmap List element to the size of the contained image.

Reset Min/Max

Resets the friction pointers of the control to the current Signal value.

Start periodical Transmission

The Signal linked to the control is transmitted periodically.

Stop periodical Transmission

The periodic transmission of the Signal is stopped.

Show Full Screen

Brings the panel into the Full screen mode. If the keyboard shortcuts were not changed in PCAN-Explorer, pressing the [F11] key also activates the Full screen mode.

Cancel Full Screen

Ends the Full screen mode of the panel. If the keyboard shortcuts were not changed in PCAN-Explorer, pressing the [F11] key also ends the Full screen mode.

Properties...

Shows the properties of the currently selected controls in the PCAN-Explorer Properties window.


Instruments Panel Context Menu

To display the Instruments Panel Context Menu, perform a click with the right mouse button on an unoccupied space of the panel. The Instruments panel context menu contains the following commands:

Run Mode

Activates the Run mode. In the Run mode, the states of the instrument's properties are frozen. The appearance and the functional properties cannot be changed anymore. This also includes the positioning of the individual instruments. Some elements of the panel cannot be used correctly if the panel is not in the Run mode.

Design Mode

Activates the Design mode. In the Design mode, you can position Display and Control elements on the panel, and configure their properties.

Insert Object

Creates a new instrument in the panel. This is only possible in the Design mode.

Paste

Inserts an instrument into the panel that has been previously copied to the Clipboard.

Fit to Contents

The right and bottom edges of the Instruments Panel window are aligned to the rightmost and bottommost instruments.

Fit to Background

The size of the Instruments Panel window is adjusted to the size of a loaded background image.

Scenes

Using this submenu, you can set one of the scenes, which are contained in the panel, into the foreground.

Add Scene

Adds a new scene to the panel. This is only possible in the Design mode.

Remove Scene

Removes the current scene from the panel. This is only possible in the Design mode. If the Panel contains only a single scene, this command is also not available.

Structure

Shows the Structure layout of the currently active Instruments Panel.

Properties...

Shows the properties of the current scene in the Properties window.

Panel Properties...

A dialog box is shown to change the properties of the currently active Instruments Panel.

See also

Instruments

Properties of the Instruments Panel


Properties of the Bitmap List

This properties is shown if a BitmapList control is selected in the Instruments Panel and the Items property is editing by the Properties window of the PCAN-Explorer.

Size of Bitmaps

Sets the size of the bitmaps that the Bitmap List contains. All bitmaps in the list have the same size. These fields can only be changed if no Bitmaps are in the list yet.

Bitmaps

This table shows all bitmaps that were already added to the Bitmap List.

Add

Adds one or several bitmaps. To add more than one bitmap at the same time, select a bitmap that contains multiple bitmaps of the selected size side by side. For example, if your Bitmap List configured to hold bitmaps of the size 40 x 40, to add 3 bitmaps at the same time, you can select a bitmap of the size 120 x 40. This bitmap is then split into 3 bitmaps of the size 40 x 40.

Remove

Removes the selected bitmap from the list.

Clear

Clears the whole list.

Move Up

Moves the selected bitmap one position upwards.

Move Down

Moves the selected bitmap one position downwards.

Transparent Bitmaps

If this option is activated, certain areas of the selected bitmap are appearing transparent, so that the panel behind the instrument is visible.

Transparent Color

If the Transparent Bitmap option is activated, all those pixels that have the same color as this color appear transparent.

Selected Bitmap

Displays the bitmap that is currently selected in the Bitmaps list.

Value

Sets the threshold value for the currently selected bitmap. If the value of the Signal that was linked to the Bitmap List reaches this threshold value, then the selected bitmap is displayed in the Bitmap List.


Properties of the Instruments Panel

An Instruments panel has various properties that can be customized by the user. The Properties dialog box can be accessed by selecting the Panel Properties command from the Instruments Panel context menu.

General tab

Here you can change general settings of the Instruments panel.

Mode

Design

Activates the Design mode. In the Design mode, you can position Display and Control elements on the panel, and configure their properties.

Run

Activates the Run mode. In the Run mode, the states of the instrument's properties are frozen. The appearance and the functional properties cannot be changed anymore. This also includes the positioning of the individual instruments. Some elements of the panel cannot be used correctly if the panel is not in the Run mode.

Update Frame Rate

The Update Frame Rate determines how often the panel elements are redrawn. If signal values change rapidly and you have a lot of components on your panel, it could be necessary to change the Update Frame Rate to reduce the CPU load of the computer.

Automatic

If this option is activated, the panel components are redrawn as fast as possible (default setting).

(Edit field)

If the Automatic option was deactivated, you can choose an Update Frame Rate in this field. For example, if you enter the value 10, the panel components are drawn up to 10 times per second. The default value is 20 Hz.

Grid

Show

If this option is activated, the layout grid is shown while the panel is in the Design mode.

Snap to Grid

If this option is activated, a component is automatically aligned to the nearest grid dot while you place it on the panel with the mouse.

Size

Sets grid spacing in pixels along the x- and y-axis.

Color

Sets the grid color.

Scenes tab

Here you can change properties related to the Scenes.

Scene switching Signal

The value of the Signal that is selected here is used in the Run mode to determine which Scene to display.

Scenes

In this list you can change the names of the Scenes that are contained in the Panel. Also, a threshold value can be assigned to every Scene. If, in the Run mode, the value of the Scene switching Signal reaches one of the threshold values, the associated Scene is shown. If the value of the Scene switching Signal is smaller than the first threshold value in the list, the first Scene is shown.

About tab

Shows information about the version and copyright of the Instruments Panel Add-in.


Structure Context Menu

Instruments Panel Documentation

Reference

Structure View Context Menu

For an Instruments panel the Structure view can be shown. This view has a context menu with various commands. To display the Structure View Context Menu, perform a right-click with the mouse on the Structure View. This menu contains the following commands:

Delete

Deletes the selected scene or control from the Instruments Panel.

Move up

Moves the selected scene or control one position upward. If a control moved upward, it is automatically in the Instruments Panel placed one level in the foreground.

Note

Active controls are always located in front of passive controls. Therefore, passive controls can not be moved further upwards when there are active controls above only.

Move down

Moves the selected scene or control one position downward. If a control moved downward, it is automatically in the Instruments Panel placed one level in the background.

Note

Passive controls are always located behind active controls. Therefore, active controls can not be moved further downwards when there are passive controls below only.

See also

Instruments

Structure


Structure

The Structure view shows all scenes and controls of an Instruments Panel in a tree. This view can be accessed by selecting the Structure command from the Instruments Panel context menu. Also the view can shown or hide by pressing the [Ctrl+F11] keyboard shortcut.

The Structure View can be shown on two ways:

  • Floating: The View will be visible above all scenes and controls of the Panel. It will be hide if the Panel was clicked by the mouse or the ESCAPE key was pressed.

  • Docking: The View will be visible on the left side of the Panel. It will only be hide if the appropriate commands were executed or the CTRL+F11 keys was pressed.

Note

In the Run mode of the Instrument Panel the Structure View will hide automatically. The Structure view can be shown only in the Design mode.

See also

Instruments

Structure Context Menu


Instruments Panel Object Model

Instruments Panel Object Model

The Instruments Panel object model allows the user to automate tasks by programming. The object model consists of a hierarchy of objects and the accompanying properties and methods.

This section treats all objects, collections, properties, and methods in the Instruments Panel object model.

In this section

Diagram of the Object Model

A graphical guide to all components of the Instruments Panel object Model.

Objects

Contains all objects of the Instruments Panel object model.

Collections

Contains all collections of the Instruments Panel object model.

Properties

Contains all properties of the objects and collections in the Instruments Panel object model.

Methods

Contains all methods of the objects and collections in the Instruments Panel object model.

Enumerations

Contains all enumeration types used with the Instruments Panel object model.

Control Types

Contains all control types of the objects in the Instruments Panel object model.


Diagram of the Instruments Panel Object Model

Send Feedback | Copyright © 2021 PEAK-System Technik GmbH. All rights reserved.


Objects

The following table lists all objects of the Instruments Panel Object model.

Object | Description
Analog120Meter | Represents an analog meter that has an 120° scale.
Analog180Meter | Represents an analog meter that has an 180° scale.
Analog270Meter | Represents an analog meter that has a 270° scale.
Analog360Meter | Represents an analog meter that has a 360° scale.
Bar | Represents a bar graph control.
BarSettings | Represents the bar settings object of a Instruments Panel control.
Bevel | Represents the bevel object of a Instruments Panel control.
BitmapList | Represents a bitmap list control.
Button | Represents a button control.
Clock | Represents a clock control.
Dial | Represents a dial control.
Font | Represents the font object of a Instruments Panel control.
GradientSettings | Represents the gradient settings object of a Instruments Panel control.
HorizontalBar | Represents a horizontal bar graph control.
HorizontalMeter | Represents a horizontal analog meter control.
HorizontalSlider | Represents a horizontal slider control.
Instruments Panel | Represents the Instruments Panel window.
Label | Represents a label control.
LED | Represents an LED control.
LEDSettings | Represents the LED settings object of a Instruments Panel control.
MinMax | Represents the minimum and maximum settings object of a Instruments Panel control.
PictureBox | Represents a picture box control.
PointerSettings | Represents the pointer settings object of a Instruments Panel control.
RockerSwitch | Represents a rocker switch control.
ScaleSettings | Represents the scale settings object of a Instruments Panel control.
Scene | Represents a scene of the Instruments Panel.
SectorSettings | Represents the sector settings object of a Instruments Panel control.
Shape | Represents a shape control.
ToggleSwitch | Represents a toggle switch control.
Trend | Represents a trend control.
ValueEdit | Represents a value edit control.
ValueIndicator | Represents a value indicator control.
ValueSettings | Represents the value settings object of a Instruments Panel control.
VerticalBar | Represents a vertical bar graph control.
VerticalMeter | Represents a vertical analog meter control.
VerticalSlider | Represents a vertical slider control.

See also

Instruments Panel Object Model

Diagram of the Object Model


Analog120Meter Object

The Analog120Meter object represents an analog meter that has an 120° scale.

Instruments Panel

Scenes

Scene

Analog120Meter

The Analog120Meter object has the following properties:

Properties
BevelOuter | ScaleFont
Caption | ScaleSettings
FlashPointer | SectorSettings
Font | ShowSectors
GradientSettings | ShowUnit
Height | Signal
IsEnabled | Top
IsVisible | Transparent
Left | Type
MinMax | UnitFont
Name | ValueSettings
PointerSettings | Width

See also

Instruments Panel Object Model

Diagram of the Object Model


Analog180Meter Object

The Analog180Meter object represents an analog meter that has an 180° scale.

Instruments Panel

Scenes

Scene

Analog180Meter

The Analog180Meter object has the following properties:

Properties
BevelOuter | ScaleFont
Caption | ScaleSettings
FlashPointer | SectorSettings
Font | ShowSectors
GradientSettings | ShowUnit
Height | Signal
IsEnabled | Top
IsVisible | Transparent
Left | Type
MinMax | UnitFont
Name | ValueSettings
PointerSettings | Width

See also

Instruments Panel Object Model

Diagram of the Object Model


Analog270Meter Object

The Analog270Meter object represents an analog meter that has a 270° scale.

Instruments Panel

Scenes

Scene

Analog270Meter

The Analog270Meter object has the following properties:

Properties
BevelOuter | ScaleFont
Caption | ScaleSettings
FlashPointer | SectorSettings
Font | ShowSectors
GradientSettings | ShowUnit
Height | Signal
IsEnabled | Top
IsVisible | Transparent
Left | Type
MinMax | UnitFont
Name | ValueSettings
PointerSettings | Width

See also

Instruments Panel Object Model

Diagram of the Object Model


Analog360Meter Object

The Analog360Meter object represents an analog meter that has a 360° scale.

Instruments Panel

Scenes

Scene

Analog360Meter

The Analog360Meter object has the following properties:

Properties
BevelOuter | ScaleFont
Caption | ScaleSettings
FlashPointer | SectorSettings
Font | ShowSectors
GradientSettings | ShowUnit
Height | Signal
IsEnabled | Top
IsVisible | Transparent
Left | Type
MinMax | UnitFont
Name | ValueSettings
PointerSettings | Width

See also

Instruments Panel Object Model

Diagram of the Object Model


Bar Object

The Bar Graph object represents a control of the Instruments Panel.

Instruments Panel

Scenes

Scene

Bar

The Bar object has the following properties:

Properties
BarSettings | Name
BevelOuter | SectorSettings
Font | Signal
GradientSettings | Top
Height | Transparent
IsEnabled | Type
IsVisible | ValueSettings
Left | Width

See also

Instruments Panel Object Model

Diagram of the Object Model


BarSettings Object

The BarSettings object represents the bar graph in a control that has a bar.

The BarSettings object has the following properties:

Properties
BackColor | ShowSectors
BiDirectional | ShowValue
Color | Style
Height | Width
ShowOverflow |

See also

Instruments Panel Object Model

Diagram of the Object Model


Bevel Object

The Bevel object represents a bevel that is used to draw a frame around an element.

The Bevel object has the following properties:

Properties
BackColor | BorderStyle
BorderColor | BorderWidth
BorderSpacing |

See also

Instruments Panel Object Model

Diagram of the Object Model


BitmapList Object

The BitmapList object represents a control of the Instruments Panel.

Instruments Panel

Scenes

Scene

BitmapList

The BitmapList object has the following properties and methods:

Properties
BitmapCount | Left
BitmapsHeight | Name
BitmapsTransparent | Signal
BitmapsWidth | Top
Height | TransparentColor
IsEnabled | Type
IsVisible | Width

Methods
AddBitmap | RemoveBitmap
ClearBitmaps |

See also

Instruments Panel Object Model

Diagram of the Object Model


Button Object

The Button object represents a actor control of the Instruments Panel.

Instruments Panel

Scenes

Scene

Button

The Button object has the following properties:

Properties
BackColor | IsEnabled
BorderColor | IsPaused
BorderWidth | IsPressed
Caption | IsVisible
CycleTime | Left
Destination | Name
ExecuteCommand | PushValue
ExecuteCommandTrigger | ReleaseValue
FlatStyle | Signal
Font | Source
Height | Top
Image | Type
ImageAlign | UseSignalCycleTime
ImageMargin | Width
ImageTransparent |

See also

Instruments Panel Object Model

Diagram of the Object Model


Clock Object

The Clock object represents a control of the Instruments Panel.

Instruments Panel

Scenes

Scene

Clock

The Clock object has the following properties:

Properties
BevelClock | IsVisible
BevelOuter | Left
ClockFormat | Name
Font | Top
GradientSettings | Transparent
Height | Type
IsEnabled | Width

See also

Instruments Panel Object Model

Diagram of the Object Model


Dial Object

The Dial object represents a actor control of the Instruments Panel.

Instruments Panel

Scenes

Scene

Dial

The Dial object has the following properties:

Properties
ActiveColor | PointerSize
BevelDial | PointerType
BevelOuter | ScaleFont
BevelValue | ScaleSettings
Caption | ShowUnit
CycleTime | ShowValue
Destination | Signal
Font | SignalFeedback
GradientSettings | SnapToScale
GradientSettingsDial | Source
Height | Top
InactiveColor | Type
IsEnabled | UpdateSignal
IsPaused | UseSignalCycleTime
IsVisible | ValueFont
Left | ValueSettings
Name | Width

See also

Instruments Panel Object Model

Diagram of the Object Model


Font Object

The Font object is used to draw text in an Instruments Panel control.

The Font object has the following properties:

Properties
Bold | Size
Color | Strikeout
Italic | Underline
Name |

See also

Instruments Panel Object Model

Diagram of the Object Model


GradientSettings Object

The GradientSettings object is used for painting a color gradient.

The GradientSettings object has the following properties:

Properties
GradientEnable | GradientStopColor
GradientStartColor | GradientStyle

See also

Instruments Panel Object Model

Diagram of the Object Model


HorizontalBar Object

The HorizontalBar object represents a control of the Instruments Panel.

Instruments Panel

Scenes

Scene

HorizontalBar

The HorizontalBar object has the following properties:

Properties
BarSettings | SectorSettings
BevelBar | ShowOverflow
BevelOuter | ShowUnit
BevelValue | ShowValue
Caption | Signal
Font | Top
GradientSettings | Transparent
Height | Type
IsEnabled | UnitFont
IsVisible | ValueFont
Left | ValueSettings
MinMax | Width
Name |

See also

Instruments Panel Object Model

Diagram of the Object Model


HorizontalMeter Object

The HorizontalMeter object represents a control of the Instruments Panel.

Instruments Panel

Scenes

Scene

HorizontalMeter

The HorizontalMeter object has the following properties:

Properties
BevelOuter | ScaleSettings
Caption | SectorSettings
FlashPointer | ShowSectors
Font | ShowUnit
GradientSettings | Signal
Height | Top
IsEnabled | Transparent
IsVisible | Type
Left | UnitFont
MinMax | ValueSettings
Name | Width
ScaleFont |

See also

Instruments Panel Object Model

Diagram of the Object Model


HorizontalSlider Object

The HorizontalSlider object represents a actor control of the Instruments Panel.

Instruments Panel

Scenes

Scene

HorizontalSlider

The HorizontalSlider object has the following properties:

Properties
ActiveColor | Name
BevelOuter | ScaleFont
ButtonSize | ScaleSettings
Caption | Signal
CycleTime | SignalFeedback
Destination | SlotColor
Font | SnapToScale
GradientSettings | Source
Height | Top
InactiveColor | Type
IsEnabled | UpdateSignal
IsPaused | UseSignalCycleTime
IsVisible | ValueSettings
Left | Width

See also

Instruments Panel Object Model

Diagram of the Object Model


Instruments Panel Object

Instruments Panel Documentation

Instruments Panel Object Model

Instruments Panel

The object in the topmost plane of the Instruments Panel object model.

The Instruments Panel object has the following properties:

Properties
ActiveScene | RunMode
Application | Scenes
Parent |

See also

Instruments Panel Object Model

Diagram of the Object Model


Label Object

The Label object represents a control of the Instruments Panel.

Instruments Panel

Scenes

Scene

Label

The Label object has the following properties:

Properties
BackColor | ShowUnit
Caption | Signal
DecimalPlaces | TextAlign
Font | Top
Height | Transparent
IsEnabled | Type
IsVisible | ValueFormat
Left | Width
Name | WordWrap

See also

Instruments Panel Object Model

Diagram of the Object Model


LED Object

The LED object represents a control of the Instruments Panel.

Instruments Panel

Scenes

Scene

LED

The LED object has the following properties:

Properties
Caption | Orientation
Flashing | Settings
Font | Signal
Height | Threshold
IsEnabled | Top
IsVisible | Type
Left | Width
Name |

See also

Instruments Panel Object Model

Diagram of the Object Model


LEDSettings Object

The LEDSettings object represents an LED on an Instruments Panel control.

The LEDSettings object has the following properties:

Properties
ColorOff | Shape
ColorOn | Width
Height |

See also

Instruments Panel Object Model

Diagram of the Object Model


MinMax Object

The MinMax object represents a property object of some Instruments Panel objects.

The MinMax object has the following properties:

Properties

ShowMaximum

ShowMinimum

See also

Instruments Panel Object Model

Diagram of the Object Model


PictureBox Object

The PictureBox object represents a actor control of the Instruments Panel.

Instruments Panel

Scenes

Scene

PictureBox

The PictureBox object has the following properties:

Properties
CycleTime | ReleaseValue
Destination | Signal
Height | SizeMode
Image | Source
IsEnabled | Top
IsPaused | Transparent
IsVisible | Type
Left | UseSignalCycleTime
Name | Width
PushValue |

See also

Instruments Panel Object Model

Diagram of the Object Model


PointerSettings Object

The PointerSettings object represents a property object of some Instruments Panel objects.

The PointerSettings object has the following properties:

Properties
Color | Shape
ColorBorder |

See also

Instruments Panel Object Model

Diagram of the Object Model


RockerSwitch Object

The RockerSwitch object represents an actor control of the Instruments Panel.

Instruments Panel

Scenes

Scene

RockerSwitch

The RockerSwitch object has the following properties:

Properties
BevelOuter | Left
Caption | Name
CycleTime | OffValue
Destination | OnValue
Font | Orientation
Height | Signal
IsEnabled | SignalFeedback
IsPaused | Source
IsVisible | Top
LEDColorOff | Type
LEDColorOn | UseSignalCycleTime
LEDHeight | Width

See also

Instruments Panel Object Model

Diagram of the Object Model


ScaleSettings Object

The ScaleSettings object represents a property object of some Instruments Panel objects.

The ScaleSettings object has the following properties:

Properties
Color | PointerBorderColor
DecimalPlaces | PointerColor
Font | StepsMajor
DrawBaseline | StepsMinor

See also

Instruments Panel Object Model

Diagram of the Object Model


Scene Object

The Scene object represents a scene of the Instruments Panel.

Instruments Panel

Scenes

Scene

The Scene object has the following properties and methods:

Properties
Application | ImageTransparent
ActiveControl | Index
BackColor | IsActive
BackImage | Name
Collection | Next
Controls | Previous
Height | SwitchValue
ImageAlignment | Width

Methods

LockUpdate

See also

Instruments Panel Object Model

Diagram of the Object Model


SectorSettings Object

The BarSettings object represents a property object of some Instruments Panel objects.

The BarSettings object has the following properties:

Properties
Offset | Sector2To
Sector1Color | Sector3Color
Sector1From | Sector3From
Sector1To | Sector3To
Sector2Color | WidthOffset
Sector2From |

See also

Instruments Panel Object Model

Diagram of the Object Model


Shape Object

The Shape object represents a shape control of the Instruments Panel.

Instruments Panel

Scenes

Scene

Shape

The Shape object has the following properties:

Properties
BorderColor | Left
BorderWidth | Name
FillColor | Shape
FillStyle | Top
Height | Type
IsVisible | Width

See also

Instruments Panel Object Model

Diagram of the Object Model


ToggleSwitch Object

The ToggleSwitch object represents a actor control of the Instruments Panel.

Instruments Panel

Scenes

Scene

ToggleSwitch

The ToggleSwitch object has the following properties:

Properties
BevelOuter | OffValue
ColorOff | OnValue
ColorOn | Orientation
CycleTime | Signal
Destination | SignalFeedback
Font | Source
Height | TextOff
IsEnabled | TextOn
IsPaused | Top
IsVisible | Type
Left | UseSignalCycleTime
Name | Width

See also

Instruments Panel Object Model

Diagram of the Object Model


Trend Object

The Trend object represents a control of the Instruments Panel.

Instruments Panel

Scenes

Scene

Trend

The Trend object has the following properties:

Properties
BevelInner | Signal
BevelOuter | Top
Caption | Transparent
Font | TrendBackColor
GradientSettings | TrendGridColor
Height | TrendHistory
IsEnabled | TrendLineColor
IsVisible | TrendTimeIndColor
Left | Type
Name | ValueSettings
ScaleFont | Width

See also

Instruments Panel Object Model

Diagram of the Object Model


ValueEdit Object

The ValueEdit object represents an actor control of the Instruments Panel.

Instruments Panel

Scenes

Scene

ValueEdit

The ValueEdit object has the following properties:

Properties
BevelOuter | ShowValueRange
Caption | Signal
CycleTime | SignalFeedback
Destination | Source
ExecuteCommand | Top
Font | Type
GradientSettings | UnitFont
Height | UseSignalCycleTime
IsEnabled | Value
IsPaused | ValueBackColor
IsVisible | ValueFont
Left | ValueRangeFont
Name | Width
ShowUnit |

See also

Instruments Panel Object Model

Diagram of the Object Model


ValueIndicator Object

The ValueIndicator object represents a control of the Instruments Panel.

Instruments Panel

Scenes

Scene

ValueIndicator

The ValueIndicator object has the following properties:

Properties
BevelOuter | Name
BevelValue | ShowUnit
Caption | Signal
Font | Top
GradientSettings | Transparent
Height | Type
IsEnabled | ValueFont
IsVisible | ValueSettings
Left | Width

See also

Instruments Panel Object Model

Diagram of the Object Model


ValueSettings Object

The ValueSettings object stores attributes associated with the value display in Instruments Panel controls.

The ValueSettings object has the following properties:

Properties
DecimalPlaces | Minimum
Maximum |

See also

Instruments Panel Object Model

Diagram of the Object Model


VerticalBar Object

The VerticalBar object represents a control of the Instruments Panel.

Instruments Panel

Scenes

Scene

VerticalBar

The VerticalBar object has the following properties:

Properties
BarSettings | SectorSettings
BevelBar | ShowOverflow
BevelOuter | ShowUnit
BevelValue | ShowValue
Caption | Signal
Font | Top
GradientSettings | Transparent
Height | Type
IsEnabled | UnitFont
IsVisible | ValueFont
Left | ValueSettings
MinMax | Width
Name |

See also

Instruments Panel Object Model

Diagram of the Object Model


VerticalMeter Object

The VerticalMeter object represents a control of the Instruments Panel.

Instruments Panel

Scenes

Scene

VerticalMeter

The VerticalMeter object has the following properties:

Properties
BevelOuter | ScaleSettings
BevelValue | SectorSettings
Caption | ShowSectors
Font | ShowValue
GradientSettings | ShowUnit
Height | Signal
IsEnabled | Top
IsVisible | Transparent
Left | Type
MinMax | UnitFont
Name | ValueFont
FlashPointer | ValueSettings
ScaleFont | Width

See also

Instruments Panel Object Model

Diagram of the Object Model


VerticalSlider Object

The VerticalSlider object represents an actor control of the Instruments Panel.

Instruments Panel

Scenes

Scene

VerticalSlider

The VerticalSlider object has the following properties:

Properties
ActiveColor | ScaleFont
BevelOuter | ScaleSettings
BevelValue | ShowUnit
ButtonSize | ShowValue
Caption | Signal
CycleTime | SignalFeedback
Destination | SlotColor
Font | SnapToScale
GradientSettings | Source
Height | Top
InactiveColor | Type
IsEnabled | UpdateSignal
IsPaused | UseSignalCycleTime
IsVisible | ValueFont
Left | ValueSettings
Name | Width

See also

Instruments Panel Object Model

Diagram of the Object Model


Collections

The Instruments Panel Object Model contains the following collections:

Collection | Description
Controls | Contains all Control objects representing an Instruments Panel Scene.
Scenes | Contains all Scene objects in the Instruments Panel.

See also

Instruments Panel Object Model

Diagram of the Object Model


Controls Collection

Instruments Panel Object Model | Reference

Contains all Control objects representing an Instruments Panel scene.

Instruments Panel

Scenes

Scene

Controls

The Controls collection has the following properties:

Properties
Application | Parent
Count |

The Controls collection has the following methods:

Methods
Add | Item
ClearAll | Remove

See also

Instruments Panel Object Model

Diagram of the Object Model


Scenes Collection

Contains all Scene objects in the Instruments Panel.

Instruments Panel

Scenes

The Scenes collection has the following properties and methods:

Properties
Application | Parent
Count |

The Scenes collection has the following methods:

Methods
Add | Item
ClearAll | Remove

See also

Instruments Panel Object Model

Diagram of the Object Model


Properties

The following properties are available in the Instruments Panel Object Model:

Property | Description
ActiveColor | Sets or returns the active color for Dial, HorizontalSlider, or VerticalSlider control.
ActiveControl | Returns the current selected Instruments Panel object of the Scene object.
ActiveScene | Returns the Scene object representing the active scene in the Instruments Panel.
Application | Returns the PCAN-Explorer Application object.
BackColor | Sets or returns the background color of an Instruments Panel object.
BackImageAlignment | Sets or returns the alignment of the image that will be displayed in the background of the Scene object.
BackImageFile | Sets or returns the image file to display in the background of the Scene object.
BarSettings | Returns a BarSettings object, which represents the bar graph in a control that has a bar.
BevelBar | Returns a Bevel object that is used to frame the bar element in HorizontalBar and VerticalBar controls.
BevelClock | Returns a Bevel object that is used to frame the clock display in a Clock element.
BevelDial | Returns a Bevel object that is used to frame the dial knob in a Dial control.
BevelOuter | Returns a Bevel object that represents the outer frame of a control.
BevelValue | Returns a Bevel object that is used to frame the value indicators in controls.
BiDirectional | Sets or returns whether the bar in the owner of the BarSettings object is displayed in a bi-directional way.
BitmapCount | Returns the count of pictures in the BitmapList object.
BitmapsHeight | Sets or returns the height of the pictures inside the BitmapList object.
BitmapsTransparent | Sets or returns whether the pictures of the BitmapList object are drawn transparent.
BitmapsWidth | Sets or returns the width of the pictures inside the BitmapList object.
Bold | Sets or returns whether the font is boldfaced.
BorderColor | Sets or returns the color of an Instruments Panel object border.
BorderSpacing | Sets or returns the border spacing of the Bevel object.
BorderStyle | Sets or returns the border style of the Bevel object.
BorderWidth | Sets or returns the border width of the Bevel, Button, or Shape object.
ButtonSize | Sets or returns the size of the HorizontalSlider or VerticalSlider button.
Caption | Sets or returns the caption of the Instruments Panel object.
ClockFormat | Sets or returns the display format for the Clock object.
Collection | Returns the collection containing the object supporting this property.
Color | Sets or returns the color of the BarSettings, PointerSettings, or ScaleSettings objects.
Color | Sets or returns the font color.
ColorOff | Sets or returns the color that is used to draw the ON state of the LEDSettings or ToggleSwitch object.
ColorOn | Sets or returns the color that is used to draw the OFF state of the LEDSettings or ToggleSwitch object.
Controls | Returns the Controls collection object from the Scene object.
Count | Returns the number of elements in the Controls or Scenes collection.
CyleTime | Sets or returns the transmit interval in milliseconds of the signal which is connected to the Instruments Panel object.
DecimalPlaces | Sets or returns the number of decimal places to display.
DrawBaseline | Sets or returns whether a base line of the ScaleSettings owner object is drawn, which connects all scale marks.
ExecuteCommand | Sets or returns the command that is executed when a Button object is clicked or when the Set button of a ValueEdit object is clicked.
ExecuteCommandTrigger | Sets or returns a value that determines when the command specified in the ExecuteCommand property of a Button object is to be executed.
FillColor | Sets or returns the color used for filling the Shape object.
FillStyle | Sets or returns the pattern used for filling the Shape object.
Flashing | Sets or returns whether the LED object is flashing in ON state.
FlashPointer | Sets or returns whether the pointer is flashing if the signal value is beyond the visible range.
FlatStyle | Sets or returns whether the flat style of the Button object is activated.
Font | Returns a Font object that is used to draw text in an Instruments Panel control.
GradientEnable | Sets or returns whether the owner of the GradientsSettings object draws a gradient to fill the background.
GradientSettings | Returns a GradientSettings object that is used for painting a color gradient.
GradientSettingsDial | Returns a GradientSettings object that is used for painting a color gradient in a dial knob.
GradientStartColor | Sets or returns the gradient start color that is used to fill the background of the GradientSettings owner object.
GradientStopColor | Sets or returns the gradient stop color that is used to fill the background of the GradientSettings owner object.
GradientStyle | Sets or returns the gradient style that is used to fill the background of the GradientSettings owner object.
Height | Sets or returns the height of the Instruments Panel object in pixels.
Height | Sets or returns the height of the bar in the BarSettings owner object in pixels.
ImageAlign | Sets or returns the alignment of an image that is displayed on a Button object.
ImageAlignment | Sets or returns the alignment of an image that is displayed in the background of a scene.
ImageFile | Sets or returns the image that will displayed on Button or PictureBox object.
ImageMargin | Sets or returns the margin between the border and the image of the Button object.
ImageTransparent | Sets or returns whether the background image of the Scene object or the image of the Button object is drawn transparent.
InactiveColor | Sets or returns the inactive color for the Dial, HorizontalSlider or VerticalSlider object.
Index | Sets or returns the index of the Scene object.
IsActive | Sets or returns whether a Scene object is topmost scene in a panel.
IsEnabled | Sets or returns whether an Instruments Panel control is enabled in run mode.
IsPaused | Sets or returns whether the cyclic transmission is paused.
IsPressed | Returns whether a Button is currently pressed.
IsVisible | Sets or returns whether an Instruments Panel control is visible in run mode.
Italic | Sets or returns whether the font is italicized.
LEDColorOff | Sets or returns the color that is used to draw the LED of the RockerSwitch object in OFF state.
LEDColorOn | Sets or returns the color that is used to draw the LED of the RockerSwitch object in ON state.
LEDHeight | Sets or returns the height for the LED of the RockerSwitch object.
Left | Sets or returns the X-coordinate of the Instruments Panel object.
Maximum | Sets or returns the maximum of the value range for the owner of the ValueSettings object.
Minimum | Sets or returns the minimum of the value range for the owner of the ValueSettings object.
MinMax | Returns a MinMax object, which stores attributes for minimum and maximum indicators on scales.
Name | Sets or returns the name of an Instruments Panel object.
Name | Sets or returns the font face.
Next | Returns the next Scene object related to a particular Scene object
Offset | Sets or returns the offset for the sectors of the SectorSettings owner object display in relation to the base line of the scale.
OffValue | Sets or returns the value that is assigned to the signal when a RockerSwitch of ToggleSwitch object is set to OFF state.
OnValue | Sets or returns the value that is assigned to the signal when a RockerSwitch of ToggleSwitch object is set to ON state.
Orientation [Variation 1] | Sets or returns the switch orientation of the RockerSwitch or ToggleSwitch object.
Orientation [Variation 2] | Sets or returns how the LED graphic in the LED object is positioned in relation to its label.
Parent | Returns the superordinate object of a Controls, Instruments Panel, or Scenes object.
PointerBorderColor | Sets or returns the border color of the pointer of the ScaleSettings owner object.
PointerColor | Sets or returns the color that is used to fill the pointer of the ScaleSettings owner object.
PointerSettings | Returns a PointerSettings object, which represents the pointer of an analog meter.
PointerSize | Sets or returns the size of the knob pointer in the Dial object.
PointerType | Sets or returns the type of the pointer on the knob of the Dial object.
Previous | Returns the previous Scene object related to a particular Scene object.
PushValue | Sets or returns the value that is assigned to the signal when the mouse button is pushed on a Button or PictureBox object.
ReleaseValue | Sets or returns the value that is assigned to the signal when the mouse button is released on a Button or PictureBox object.
ScaleFont | Returns a Font object that is used to draw the labels of a scale.
ScaleSettings | Returns a ScaleSettings object, which represents a scale of an Instruments Panel control.
Scenes | Returns the Scenes collection object representing all Scene objects in the Instruments Panel object.
Sector1Color | Sets or returns the color that is used to fill sector 1 of the SectorSettings owner object.
Sector1From | Sets or returns the start of sector 1 of the SectorSettings owner object as a per mill value.
Sector1To | Sets or returns the end of sector 1 of the SectorSettings owner object as a per mill value.
Sector2Color | Sets or returns the color that is used to fill sector 2 of the SectorSettings owner object.
Sector2From | Sets or returns the start of sector 2 of the SectorSettings owner object as a per mill value.
Sector2To | Sets or returns the end of sector 2 of the SectorSettings owner object as a per mill value.
Sector3Color | Sets or returns the color that is used to fill sector 3 of the SectorSettings owner object.
Sector3From | Sets or returns the start of sector 3 of the SectorSettings owner object as a per mill value.
Sector3To | Sets or returns the end of sector 3 of the SectorSettings owner object as a per mill value.
SectorSettings | Returns a SectorSettings object, which represents the sector display in analog scales.
Settings | Returns an LEDSettings object that represents the LED on an Instruments Panel control.
Shape [Variation 1] | Sets or returns the shape of the PointerSettings owner object pointer.
Shape [Variation 2] | Sets or returns the shape type of the Shape object.
ShowMaximum | Sets or returns whether a maximum indicator is shown for the MinMax owner object.
ShowMinimum | Sets or returns whether a minimum indicator is shown for the MinMax owner object.
ShowOverflow | Sets or returns whether overflow indicators of the BarSettings, HorizontalBar or VerticalBar objects are shown.
ShowSectors | Sets or returns whether sectors are shown for the Instruments Panel object.
ShowUnit | Sets or returns whether the Instruments Panel object displays the physical unit of an associated signal.
ShowValue | Sets or returns whether a value indicator is shown in the Instruments Panel object.
ShowValueRange | Sets or returns whether the allowed range of values is displayed on the ValueEdit object.
Signal | Sets or returns the signal associated with the Instruments Panel object.
SignalFeedback | Sets or returns whether the Instruments Panel object is updated when the Signal value is changed externally.
Size | Sets or returns the height of the font in points.
SizeMode | Sets or returns how the PictureBox object will handle image placement and control sizing.
SlotColor | Sets or returns the color that is used to paint the slot of the Slider object.
SnapToScale | Sets or returns whether the slider or dial snaps to the scale marks when released.
StepsMajor | Sets or returns the number of major steps the scale of the ScaleSettings owner object is devided into.
StepsMinor | Sets or returns the number of steps between two major scale marks of the ScaleSettings owner object.
Strikeout | Sets or returns whether the font is displayed with a horizontal line through it.
Style | Sets or returns the style of the bar in the BarSettings owner object.
SwitchValue | Sets or returns the signal threshold value at which the Scene object is being activated.
TextAlign | Sets or returns the position of the text within the Label object.
TextOff | Sets or returns the text that the ToggleSwitch object displays in OFF state.
TextOn | Sets or returns the text that the ToggleSwitch object displays in ON state.
Threshold | Sets or returns the threshold value at which the LED object switches from OFF to ON State and reverse.
Top | Sets or returns the Y-coordinate of the Instruments Panel object.
Transparent | Sets or returns whether the background of the Instruments Panel object obscures objects below its self.
TransparentColor | Sets or returns the transparent color for the pictures in the BitmapList object.
TrendBackColor | Sets or returns the color that is used to fill the display of the Trend object.
TrendGridColor | Sets or returns the color of the grid in the Trend object.
TrendHistory | Sets or returns the duration of the Trend object history in Minutes.
TrendLineColor | Sets or returns the color of the lines in the Trend object.
TrendTimeIndColor | Sets or returns the color of the time indicator in the Trend object.
Underline | Sets or returns whether the font is underlined.
UnitFont | Representing the Font object used to display unit text in the Instruments Panel object.
UpdateSignal | Sets or returns whether the signal value is updated while the dial knob is turned or the Slider is moved in Instruments Panel objects.
UseSignalCyleTime | Sets or returns whether the default Signal cycle time is used for cycle transmission.
Value | Sets or returns the value text of a ValueEdit object.
ValueBackColor | Sets or returns the color that is used to fill the background of the value edit field.
ValueFont | Returns a Font object, which represents the font that is used to display the signal value in a control.
ValueFormat | Sets or returns the format of the displayed signal value in the Label object.
ValuePush | Sets or returns the value that is assigned to the signal when the Button object is pushed.
ValueRelease | Sets or returns the value that is assigned to the signal when the Button object is released.
ValueSettings | Returns a ValueSettings object, which stores attributes associated with the value display in Instruments Panel controls.
Width | Sets or returns the width of the Instruments Panel object in pixels.
Width | Sets or returns the width of the bar in the BarSettings owner object in pixels.
WidthOffset | Sets or returns the width for the sectors of the SectorSettings owner object display relative to its auto-calculated width.
WordWrap | Sets or returns whether the label text wraps when it is too long for the width of the Label object.

See also

Instruments Panel Object Model

Diagram of the Object Model


ActiveColor Property

Applies to the following objects: Dial | HorizontalSlider | VerticalSlider

Sets or returns the color that used to fill the pointer or button when the control has the input focus.

Syntax

object.ActiveColor [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A Long value defining new active color for the object.

Remarks

The ActiveColor property has the type Long.

Example

The following example changes the ActiveColor property of the Dial object:

VBScript

Sub ActiveColorExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeDial)

ctrl.ActiveColor = vbRed

End Sub


Application Property

Instruments Panel Object Model | Reference

Applies to the following objects: Instruments Panel | Scene

Retrieves the PCAN-Explorer Application object.

Syntax

object.Application

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Remarks

The Application property returns the PCAN-Explorer Application object.

Example

The following example retrieves the Application object of the Scene object:

VBScript

Sub ApplicationExample()

Dim doc, scene, app

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set app = scene.Application

' Insert code that accesses the Application object

End Sub


BackColor Property

Applies to the following objects: BarSettings | Bevel | Button | Label | Scene

Sets or returns the background color of a Instruments Panel object.

Syntax

object.BackColor [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A Long value defining the new background color for the object.

Remarks

The BackColor property has the type Long.

Example

The following example changes the BackColor property of the Label object:

VBScript

Sub BackColorExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeLabel)

ctrl.BackColor = RGB(&hE2, &hE2, &hE2)

ctrl.Transparent = false

End Sub


BarSettings Property

Applies to the following objects: Bar | HorizontalBar | VerticalBar

Returns a BarSettings object.

Syntax

object.BarSettings

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Remarks

The BarSettings property returns a BarSettings object.

Example

The following example accesses the BarSettings object of the Bar object:

VBScript

Sub BarSettingsExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeBar)

ctrl.BarSettings.ShowValue = false

End Sub


BiDirectional Property

Applies to: BarSettings object

Sets or returns whether the bar in the owner of the BarSettings object is displayed in a bi-directional way.

Syntax

object.BiDirectional [=Value]

Parameters

object

An expression that yields a BarSettings object.

Value

A Boolean value defining whether the bar is displayed in a bi-directional way.

Remarks

The BiDirectional property has the type Boolean.

Example

The following example changes the BiDirectional property of the BarSettings object:

VBScript

Sub BarSettingsBiDirectionalExample()

Dim doc, scene, bar

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set bar = scene.Controls.Add(peControlTypeBar)

bar.BarSettings.BiDirectional = true

End Sub


Height Property

Applies to: BarSettings object

Sets or returns the height of the bar in the BarSettings owner object in pixels.

Syntax

object.Height [=Value]

Parameters

object

An expression that yields a BarSettings object.

Value

A Long value defining the height of the bar in pixels.

Remarks

The Height property has the type Long.

Example

The following example changes the Height property of the BarSettings object:

VBScript

Sub BarSettingsHeightExample()

Dim doc, scene, bar

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set bar = scene.Controls.Add(peControlTypeHorizontalBar)

bar.BarSettings.Height = 20

End Sub


Style Property

Applies to: BarSettings object

Sets or returns the style of the bar in the BarSettings owner object.

Syntax

object.Style [=Value]

Parameters

object

An expression that yields a BarSettings object.

Value

A PeBarStyle enumeration value defining the new bar style.

Remarks

The Style property has the type PeBarStyle.

Example

The following example sets the Style property of the BarSettings object:

VBScript

Sub BarSettingsStyleExample()

Dim doc, scene, bar

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set bar = scene.Controls.Add(peControlTypeBar)

bar.BarSettings.Style = peLine

End Sub


Width Property

Applies to: BarSettings object

Sets or returns the width of the bar in the BarSettings owner object in pixels.

Syntax

object.Width [=Value]

Parameters

object

An expression that yields a BarSettings object.

Value

A Long value defining the width of the bar in pixels.

Remarks

The Width property has the type Long.

Example

The following example changes the Width property of the BarSettings object:

VBScript

Sub BarSettingsWidthExample()

Dim doc, scene, bar

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set bar = scene.Controls.Add(peControlTypeVerticalBar)

bar.BarSettings.Width = 20

End Sub


BorderSpacing Property

Applies to: Bevel object

Sets or returns the border spacing of the Bevel object.

Syntax

object.BorderSpacing [=Value]

Parameters

object

An expression that yields a Bevel object.

Value

A Long value defining the new border spacing.

Remarks

The BorderSpacing property has the type Long.

Example

The following example sets the BorderSpacing property of the Bevel object:

VBScript

Sub BevelBorderSpacingExample()

Dim doc, scene, meter

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set meter = scene.Controls.Add(peControlTypeVerticalMeter)

meter.BevelOuter.BorderSpacing = 10

End Sub


BorderStyle Property

Applies to: Bevel object

Sets or returns the border style of the Bevel object.

Syntax

object.BorderStyle [=Value]

Parameters

object

An expression that yields a Bevel object.

Value

A PeBorderStyle enumeration value defining the new border style.

Remarks

The BorderStyle property has the type PeBorderStyle.

Example

The following example sets the BorderStyle property of the Bevel object:

VBScript

Sub BevelBorderStyleExample()

Dim doc, scene, meter

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set meter = scene.Controls.Add(peControlTypeVerticalMeter)

meter.BevelOuter.BorderStyle = peBorderStyleRaised

meter.BevelValue.BorderStyle = peBorderStyleLowered

End Sub


BevelBar Property

Instruments Panel Object Model | Reference

Applies to the following objects: HorizontalBar | VerticalBar

Returns a Bevel object that represents the bevel of an inner bar graph.

Syntax

object.BevelBar

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Remarks

The BevelBar property returns a Bevel object.

Example

The following example accesses the BevelBar object of the HorizontalBar object:

VBScript

Sub BevelBarExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeHorizontalBar)

ctrl.BevelBar.BorderWidth = 2

End Sub


BevelOuter Property

Applies to the following objects: Analog120Meter | Analog180Meter | Analog270Meter | Analog360Meter | Bar | Clock | Dial | HorizontalBar | HorizontalMeter | HorizontalSlider | RockerSwitch | ToggleSwitch | Trend | ValueEdit | ValueIndicator | VerticalBar | VerticalMeter | VerticalSlider

Returns a Bevel object that represents the outer bevel of the control.

Syntax

object.BevelOuter

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Remarks

The BevelOuter property returns a Bevel object.

Example

The following example accesses the BevelOuter object of the Analog120Meter object:

VBScript

Sub BevelOuterExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog120Meter)

ctrl.BevelOuter.BorderWidth = 5

End Sub


BevelValue Property

Applies to the following objects: Dial | HorizontalBar | ValueIndicator | VerticalBar | VerticalMeter | VerticalSlider

Returns a Bevel object that represents the bevel of an inner value indicator.

Syntax

object.BevelValue

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Remarks

The BevelValue property returns a Bevel object.

Example

The following example accesses the BevelValue object of the Dial object:

VBScript

Sub BevelValueExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeDial)

ctrl.BevelValue.BorderWidth = 5

End Sub


BitmapCount Property

Applies to: BitmapList object

Retrieves the count of pictures in the BitmapList object.

Syntax

object.BitmapCount

Parameters

object

An expression that yields a BitmapList object.

Remarks

The BitmapCount property has the type Long.

Example

The following example retrieves the BitmapCount of the object:

VBScript

Sub GetBitmapCountExample()

Dim doc, scene, bmpList, count

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set bmpList = scene.Controls.Add(peControlTypeBitmapList)

count = bmpList.BitmapCount

' Insert code that uses the picture count value

End Sub


BitmapsHeight Property

Applies to: BitmapList object

Sets or returns the height of the pictures inside the BitmapList object.

Syntax

object.BitmapsHeight [=Value]

Parameters

object

An expression that yields a BitmapList object.

Value

A Long value defining the height in pixel.

Remarks

The BitmapsHeight property has the type Long.

Example

The following example changes the BitmapsHeight of the object:

VBScript

Sub SetBitmapsHeightExample()

Dim doc, scene, bmpList

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set bmpList = scene.Controls.Add(peControlTypeBitmapList)

bmpList.BitmapsHeight = 48

End Sub


BitmapsTransparent Property

Applies to: BitmapList object

Sets or returns whether the pictures of the BitmapList object are drawn transparent.

Syntax

object.BitmapsTransparent

Parameters

object

An expression that yields a BitmapList object.

Value

A Boolean value defining the whether the pictures are drawn transparent.

Remarks

The BitmapsTransparent property has the type Boolean.

Example

The following example changes the transparency of the object:

VBScript

Sub SetBitmapsTransparentExample()

Dim doc, scene, bmpList

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set bmpList = scene.Controls.Add(peControlTypeBitmapList)

bmpList.BitmapsTransparent = true

End Sub


BitmapsWidth Property

Applies to: BitmapList object

Sets or returns the width of the pictures in the BitmapList object.

Syntax

object.BitmapsWidth [=Value]

Parameters

object

An expression that yields a BitmapList object.

Value

A Long value defining the picture width in pixels.

Remarks

The BitmapsWidth property has the type Long.

Example

The following example changes the BitmapsWidth of the object:

VBScript

Sub SetBitmapsWidthExample()

Dim doc, scene, bmpList

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set bmpList = scene.Controls.Add(peControlTypeBitmapList)

bmpList.BitmapsWidth = 128

End Sub


TransparentColor Property

Applies to: BitmapList object

Sets or returns the transparent color for the pictures in the BitmapList object.

Syntax

object.TransparentColor

Parameters

object

An expression that yields a BitmapList object.

Value

A Long value defining the transparent color.

Remarks

The TransparentColor property has the type Long.

Example

The following example changes the transparent color of the object:

VBScript

Sub SetTransparentColorExample()

Dim doc, scene, bmpList

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set bmpList = scene.Controls.Add(peControlTypeBitmapList)

bmpList.TransparentColor = RGB(&hFF, &h00, &hFF)

End Sub


BorderColor Property

Applies to the following objects: Bevel | Button | PointerSettings | Shape

Sets or returns the color of the object border.

Syntax

object.BorderColor [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies to list above.

Value

A Long value defining the new border color for the object.

Remarks

The BorderColor property has the type Long.

Setting the BorderColor property of a Bevel object has an effect only if the BorderStyle property is set to "Flat".

Setting the BorderColor property of a Button object has an effect only if the FlatStyle property is set to True.

Example

The following example changes the BorderColor property of the Analog270Meter object:

VBScript

Sub BorderColorExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog270Meter)

ctrl.BevelOuter.BorderColor = vbNavy

End Sub


BorderWidth Property

Applies to the following objects: Bevel | Button | Shape

Sets or returns the border width of a Instruments Panel object.

Syntax

object.BorderWidth [=Value]

Parameters

object

An expression that evaluates the one of the objects in the Applies To list above.

Value

A Long value defining the new border width for the objects.

Remarks

The BorderWidth property has the type Long.

Example

The following example changes the BorderWidth property of the Bevel object:

VBScript

Sub BevelBorderWidthExample()

Dim doc, scene, meter

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set meter = scene.Controls.Add(peControlTypeVerticalMeter)

meter.BevelOuter.BorderWidth = 2

End Sub


ExecuteCommandTrigger Property

Applies to the following objects: Button

Sets or returns a value that determines when the command specified in the ExecuteCommand property is to be executed.

Syntax

object.ExecuteCommandTrigger [=Value]

Parameters

object

An expression that evaluates to a Button object.

Value

A PeExecuteCommandTrigger value that sets the new value of the property.

Property Value

A PeExecuteCommandTrigger enum value.

  • peExecuteCommandTriggerClick (0): The command is executed after the left mouse button is pressed and released. If the Button already has the input focus, pressing and releasing the Space bar also executes the command. This is the default behavior.

  • peExecuteCommandTriggerKeyDown (1): The command is executed immediately when the left mouse button is pressed. If the Button already has the input focus, pressing the Space bar also executes the command.

Example

The following example changes the ExecuteCommandTrigger property of the Button object:

VBScript

Sub ButtonExecuteCommandTriggerExample()

Dim doc, panel, button

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set panel = doc.ActiveWindow.Object

Set button = panel.ActiveScene.Controls.Add(peControlTypeButton)

button.Caption = "Fullscreen ON/OFF"

button.Width = 150

button.ExecuteCommand = "ToggleFullScreen"

button.ExecuteCommandTrigger = peExecuteCommandTriggerKeyDown

panel.RunMode = True

End Sub

See Also

ExecuteCommand Property


FlatStyle Property

Applies to: Button object

Sets or returns whether the flat style of the Button object is activated.

Syntax

object.FlatStyle [=Value]

Parameters

object

An expression that yields a Button object.

Value

A Boolean value defining whether the flat style is activated.

Remarks

The FlatStyle property has the Boolean type.

Example

The following example changes the FlatStyle property of the Button object:

VBScript

Sub ButtonFlatStyleExample()

Dim doc, scene, button

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set bar = scene.Controls.Add(peControlTypeButton)

button.FlatStyle = true

End Sub


ImageAlign Property

Applies to: Button object

Sets or returns the alignment of an image that is displayed on a button.

Syntax

object.ImageAlign [=Value]

Parameters

object

An expression that yields a Button object.

Value

A PeImageAlignment enumeration value defining the new alignment of the image.

Remarks

The ImageAlign property has the type PeImageAlignment.

Example

The following example changes the ImageAlign property of the Button object:

VBScript

Sub ButtonImageAlignExample()

Dim doc, scene, button

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set bar = scene.Controls.Add(peControlTypeButton)

button.Image = "Switch.bmp"

button.ImageAlign = peImageAlignLeft

End Sub


ImageMargin Property

Applies to: Button object

Sets or returns the margin between the border and the image of the Button object, if the image is not aligned to the center.

Syntax

object.ImageMargin [=Value]

Parameters

object

An expression that yields a Button object.

Value

A Long value defining the new image margin.

Remarks

The ImageMargin property has the type Long.

Example

The following example changes the ImageMargin property of the Button object:

VBScript

Sub ButtonImageMarginExample()

Dim doc, scene, button

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set bar = scene.Controls.Add(peControlTypeButton)

button.Image = "Switch.bmp"

button.ImageMargin = 2

End Sub


IsPressed Property

Applies to the following objects:

Button

Returns whether the button is currently pressed.

Syntax

object.IsPressed [=Value]

Parameters

object

An expression that evaluates to a button object.

Property Value

A Boolean value that indicates whether the button is currently pressed.

Example

The following example waits until the button named 'Button1' has been pressed:

VBScript

Sub IsPressedExample()

Dim panel, btn, waiting

Set panel = Documents("MyPanel.ipf").ActiveWindow.Object

Set btn = panel.ActiveScene.Controls("Button1")

waiting = True

While waiting

If btn.IsPressed Then

PrintToOutputWindow "Button1 pressed"

waiting = False

End If

Wait 100

Wend

End Sub


ButtonSize Property

Instruments Panel Object Model | Reference

Applies to the following objects: HorizontalSlider | VerticalSlider

Sets or returns the size of the slider button.

Syntax

object.ButtonSize [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A Long value defining the new slider button size.

Remarks

The ButtonSize property has the type Long.

Example

The following example changes the ButtonSize property of the HorizontalBar object:

VBScript

Sub ButtonSizeExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeHorizontalSlider)

ctrl.ButtonSize = 20

End Sub


Caption Property

Applies to the following objects: Analog120Meter | Analog180Meter | Analog270Meter | Analog360Meter | Button | Dial | HorizontalBar | HorizontalMeter | HorizontalSlider | Label | LED | RockerSwitch | Trend | ValueEdit | ValueIndicator | VerticalBar | VerticalMeter | VerticalSlider

Sets or returns the caption of the object that is shown in the instruments panel.

Syntax

object.Caption [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A String value defining the caption of the control.

Remarks

The Caption property has the type String.

Example

The following example changes the Caption property of the Analog120Meter object:

VBScript

Sub CaptionExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog120Meter)

ctrl.Caption = "AnalogMeter1"

End Sub


BevelClock Property

Applies to: Clock object

Returns the Bevel object representing the inner bevel that surrounds the clock display.

Syntax

object.BevelClock

Parameters

object

An expression that yields a Clock object.

Remarks

The BevelClock property returns a Bevel object.

Example

The following example accesses the BevelClock object of the Clock object:

VBScript

Sub BevelClockExample()

Dim doc, scene, clock

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set clock = scene.Controls.Add(peControlTypeClock)

clock.BevelClock.BorderWidth = 5

End Sub


ClockFormat Property

Applies to: Clock object

Sets or returns the display format for the Clock object.

Syntax

object.ClockFormat

Parameters

object

An expression that yields a Clock object.

Value

A PeClockFormat enumeration value defining the new display format of the clock.

Remarks

The ClockFormat property has the PeClockFormat type.

Example

The following example changes the ClockFormat property of the Clock object:

VBScript

Sub ClockFormatExample()

Dim doc, scene, clock

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set clock = scene.Controls.Add(peControlTypeClock)

clock.ClockFormat = peClockFormatDateTime

End Sub


Color Property

Applies to the following objects: BarSettings | PointerSettings | ScaleSettings

Sets or returns the color of an object.

Syntax

object.Color [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A Long value defining the new Color for the object.

Remarks

The Color property has the type Long.

Example

The following example changes the pointer color of an Analog120Meter:

VBScript

Sub ColorExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog120Meter)

ctrl.PointerSettings.Color = vbMaroon

End Sub


ColorOff Property

Instruments Panel Object Model | Reference

Applies to the following objects: LEDSettings | ToggleSwitch

Sets or returns the color that is used to draw the OFF state of the objects mentioned above.

Syntax

object.ColorOff [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A Long value defining the new ColorOff value.

Remarks

The ColorOff property has the type Long.

Example

The following example changes the OFF color for an LED:

VBScript

Sub ColorOffExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeLED)

ctrl.Settings.ColorOff = vbRed

End Sub


ColorOn Property

Instruments Panel Object Model | Reference

Applies to the following objects: LEDSettings | ToggleSwitch

Sets or returns the color that is used to draw the ON state of the objects mentioned above.

Syntax

object.ColorOn [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A Long value defining the new ColorOn value.

Remarks

The ColorOn property has the type Long.

Example

The following example changes the ON color for an LED:

VBScript

Sub ColorOnExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeLED)

ctrl.Settings.ColorOn = vbGreen

End Sub


Count Property

Instruments Panel Object Model | Reference

Applies to the following objects: Controls | Scenes

Returns the number of elements in the collection.

Syntax

object.Count

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Remarks

The Count property has the type Long.

The Count property can be used to determine the number of scenes in the Scenes collection, for example.

Example

The following example prints the names of all scenes to the Output window:

VBScript

Sub CountExample()

' Before execution, make sure a Panel window has the focus

Set panel = ActiveWindow.Object

For i = 1 To panel.Scenes.Count

PrintToOutputWindow panel.Scenes(i).Name

Next

End Sub


CycleTime Property

Applies to the following actor objects:

Button | Dial | HorizontalSlider | PictureBox | RockerSwitch | ToggleSwitch | ValueEdit | VerticalSlider

Sets or returns the transmit interval in milliseconds of the signal which is connected to the Instruments Panel object.

Syntax

object.CycleTime [=Value]

Parameters

object

An expression that yields a control object.

Value

A Long value defining the transmit interval in milliseconds of the connected signal.

Remarks

The CycleTime property has the Long type.

Example

The following example changes the cycle time of the Dial object to "500":

VBScript

Sub CycleTimeExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeDial)

ctrl.CycleTime = 500

End Sub


DecimalPlaces Property

Instruments Panel Object Model | Reference

Applies to the following objects Label | ScaleSettings

Sets or returns the number of decimal places to display.

Syntax

object.DecimalPlaces [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A Long value defining the new number for decimal places.

Remarks

The DecimalPlaces property has the type Long.

Example

The following example changes the DecimalPlaces property of the Label object:

VBScript

Sub ColorExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeLabel)

ctrl.DecimalPlaces = 2

End Sub


Destination Property

Applies to the following actor objects:

Button | Dial | HorizontalSlider | PictureBox | RockerSwitch | ToggleSwitch | ValueEdit | VerticalSlider

Sets or returns the destination address to transmit the signal which is connected to the Instruments Panel object.

This property can only used with the J1939 Add-in and the symbol type J1939PG.

Syntax

object.Destination [=Value]

Parameters

object

An expression that yields a control object.

Value

A String value defining the destination address for the connected signal. Values between "0" and "253" are supported. The constant value "null", and "all" or "global" can also be used. The default value of this property is an empty string and means that the PCAN-Explorer controls the addressing for the transmission of the signal and message.

Remarks

The Destination property has the String type.

Example

The following example changes the destination address of the VerticalSlider object:

VBScript

Sub DestinationAddressExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeVerticalSlider)

ctrl.Source = ""

ctrl.Destination = "249"

End Sub


BevelDial Property

Applies to: Dial object

Returns the Bevel object representing the dial settings for the Dial object.

Syntax

object.BevelDial

Parameters

object

An expression that yields a Dial object.

Remarks

The BevelDial property returns a Bevel object.

Example

The following example accesses the BevelDial object of the Dial object:

VBScript

Sub BevelDialExample()

Dim doc, scene, dial

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set dial = scene.Controls.Add(peControlTypeDial)

dial.BevelDial.BorderWidth = 5

End Sub


GradientSettingsDial Property

Applies to: Dial object

Returns the GradientSettings object representing the gradient settings for the Dial object.

Syntax

object.GradientSettingsDial

Parameters

object

An expression that yields a Dial object.

Remarks

The GradientSettingsDial property returns a GradientSettings object.

Example

The following example accesses the GradientSettings object of the Dial object:

VBScript

Sub GradientSettingsDialExample()

Dim doc, scene, dial

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set dial = scene.Controls.Add(peControlTypeDial)

dial.GradientSettingsDial.GradientEnable = true

End Sub


PointerSize Property

Applies to: Dial object

Sets or returns the size of the knob pointer in the Dial object.

Syntax

object.PointerSize [=Value]

Parameters

object

An expression that yields a Dial object.

Value

A Long value defining the new knob size.

Remarks

The PointerSize property has the type Long.

Example

The following example changes the PointerSize property of the Dial object:

VBScript

Sub PointerSizeExample()

Dim doc, scene, dial

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set dial = scene.Controls.Add(peControlTypeDial)

dial.PointerSize = 10

End Sub


PointerType Property

Applies to: Dial object

Sets or returns the type of the pointer on the knob of the Dial object.

Syntax

object.PointerType [=Value]

Parameters

object

An expression that yields a Dial object.

Value

A PeDialPointerStyle enumeration value defining the new pointer type.

Remarks

The PointerType property has the type PeDialPointer.

Example

The following example changes the PointerType property of the Dial object:

VBScript

Sub PointerTypeExample()

Dim doc, scene, dial

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set dial = scene.Controls.Add(peControlTypeDial)

dial.PointerType = peDialPointerTriangle

End Sub


ExecuteCommand Property

Instruments Panel Object Model | Reference

Applies to the following objects: Button | ValueEdit

Sets or returns the command that is executed when a Button object is clicked or when the Set button of a ValueEdit object is clicked.

Syntax

object.ExecuteCommand [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A String value defining the new command to be executed.

Property Value

A String value that specifies the command to be executed.

Example

The following example changes the ExecuteCommand property of the Button object:

VBScript

Sub ButtonExecuteCommandExample()

Dim doc, panel, button

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set panel = doc.ActiveWindow.Object

Set button = panel.ActiveScene.Controls.Add(peControlTypeButton)

button.Caption = "Fullscreen ON/OFF"

button.Width = 150

button.ExecuteCommand = "ToggleFullScreen"

panel.RunMode = True

End Sub

See Also

ExecuteCommandTrigger Property


Font Property

Applies to the following objects: Analog120Meter | Analog180Meter | Analog270Meter | Analog360Meter | Bar | Button | Clock | Dial | HorizontalBar | HorizontalMeter | HorizontalSlider | Label | LED | RockerSwitch | ToggleSwitch | Trend | ValueEdit | ValueIndicator | VerticalBar | VerticalMeter | VerticalSlider | ScaleSettings

Returns the Font object used to display text in the objects mentioned above.

Syntax

object.Font

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Remarks

The Font property returns a Font object.

Example

The following example accesses the Font object of the Analog120Meter object:

VBScript

Sub FontExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog120Meter)

ctrl.Font.Bold = true

End Sub


Bold Property

Applies to: Font object

Sets or returns whether the font is boldfaced.

Syntax

object.Bold [=Value]

Parameters

object

An expression that yields a Font object.

Value

A Boolean value defining whether the font is boldfaced.

Remarks

The Bold property has the type Boolean.

Example

The following example changes the Bold property of the Font object:

VBScript

Sub FontBoldExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeLabel)

ctrl.Caption = "Bold Label"

ctrl.Font.Bold = true

End Sub


Color Property

Applies to: Font object

Sets or returns the font color.

Syntax

object.Color [=Value]

Parameters

object

An expression that yields a Font object.

Value

A Long value defining the new font color.

Remarks

The Color property has the type Long.

Example

The following example changes the Color property of the Font object:

VBScript

Sub FontColorExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeLabel)

ctrl.Caption = "Color Label"

ctrl.Font.Color = vbGreen

End Sub


Italic Property

Applies to: Font object

Sets or returns whether the font is italicized.

Syntax

object.Italic [=Value]

Parameters

object

An expression that yields a Font object.

Value

A Boolean value defining whether the font is italicized.

Remarks

The Italic property has the type Boolean.

Example

The following example changes the Italic property of the Font object:

VBScript

Sub FontItalicExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeLabel)

ctrl.Caption = "Italic Label"

ctrl.Font.Italic = true

End Sub


Name Property

Applies to: Font object

Sets or returns the font face.

Syntax

object.Name [=Value]

Parameters

object

An expression that yields a Font object.

Value

A String value defining the new font face.

Remarks

The Name property has the type String.

Example

The following example changes the Name property of the Font object:

VBScript

Sub FontNameExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeLabel)

ctrl.Caption = "Arial Label"

ctrl.Font.Name = "Arial"

End Sub


Size Property

Applies to: Font object

Sets or returns the height of the font in points.

Syntax

object.Size [=Value]

Parameters

object

An expression that yields a Font object.

Value

A Long value defining the new font size.

Remarks

The Size property has the type Long.

Example

The following example changes the Size property of the Font object:

VBScript

Sub FontSizeExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeLabel)

ctrl.Caption = "Size Label"

ctrl.Font.Size = 10

End Sub


Strikeout Property

Applies to: Font object

Sets or returns whether the font is displayed with a horizontal line through it.

Syntax

object.Strikeout [=Value]

Parameters

object

An expression that yields a Font object.

Value

A Boolean value defining whether the font has the strikeout style.

Remarks

The Strikeout property has the type Boolean.

Example

The following example changes the Strikeout property of the Font object:

VBScript

Sub FontStrikeoutExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeLabel)

ctrl.Caption = "Strikeout Label"

ctrl.Font.Strikeout = true

End Sub


Underline Property

Applies to: Font object

Sets or returns whether the font is underlined.

Syntax

object.Underline [=Value]

Parameters

object

An expression that yields a Font object.

Value

A Boolean value defining whether the font is underlined.

Remarks

The Underline property has the type Boolean.

Example

The following example changes the Underline property of the Font object:

VBScript

Sub FontUnderlineExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeLabel)

ctrl.Caption = "Underline Label"

ctrl.Font.Underline = true

End Sub


FlashPointer Property

Applies to the following objects: Analog120Meter | Analog180Meter | Analog270Meter | Analog360Meter | HorizontalMeter | VerticalMeter

Sets or returns whether the pointer is flashing if the signal value is beyond the visible range.

Syntax

object.FlashPointer [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A Boolean value defining whether the pointer is flashing.

Remarks

The FlashPointer property has the type Boolean.

Example

The following example changes the FlashPointer property of the Analog120Meter object:

VBScript

Sub FlashPointerExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog120Meter)

ctrl.FlashPointer = true

End Sub


GradientSettings Property

Applies to the following objects: Analog120Meter | Analog180Meter | Analog270Meter | Analog360Meter | Bar | Clock | Dial | HorizontalBar | HorizontalMeter | HorizontalSlider | Trend | ValueEdit | ValueIndicator | VerticalBar | VerticalMeter | VerticalSlider

Returns a GradientSettings object.

Syntax

object.GradientSettings

Parameters

object

An expression that evaluates to a control object.

Remarks

The GradientSettings property returns a GradientSettings object.

Example

The following example accesses the GradientSettings object of the Bar object:

VBScript

Sub GradientSettingsExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeBar)

ctrl.GradientSettings.GradientEnable = true

End Sub


GradientEnable Property

Applies to: GradientSettings object

Sets or returns whether the owner of the GradientsSettings object draws a gradient to fill the background.

Syntax

object.GradientEnable [=Value]

Parameters

object

An expression that yields a GradientSettings object.

Value

A Boolean value defining whether the owner object draws a gradient.

Remarks

The GradientEnable property has the type Boolean.

Example

The following example changes the GradientEnable property of the GradientSettings object:

VBScript

Sub GradientSettingsEnableExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeValueIndicator)

ctrl.GradientSettings.GradientEnable = true

End Sub


GradientStartColor Property

Applies to: GradientSettings object

Sets or returns the gradient start color that is used to fill the background of the GradientSettings owner object.

Syntax

object.GradientStartColor [=Value]

Parameters

object

An expression that yields a GradientSettings object.

Value

A Long value defining the new start color for the gradient drawing.

Remarks

The GradientStartColor property has the type Long.

Example

The following example changes the GradientStartColor property of the GradientSettings object:

VBScript

Sub GradientSettingsStartColorExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeValueIndicator)

ctrl.GradientSettings.GradientStartColor = RGB(&h66, &hFF, &h66)

ctrl.GradientSettings.GradientStopColor = RGB(&h00, &h71, &h00)

End Sub


GradientStopColor Property

Applies to: GradientSettings object

Sets or returns the gradient stop color that is used to fill the background of the GradientSettings owner object.

Syntax

object.GradientStopColor [=Value]

Parameters

object

An expression that yields a GradientSettings object.

Value

A Long value defining the new stop color for the gradient drawing.

Remarks

The GradientStopColor property has the type Long.

Example

The following example changes the GradientStopColor property of the GradientSettings object:

VBScript

Sub GradientSettingsStartColorExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeValueIndicator)

ctrl.GradientSettings.GradientStartColor = RGB(&h66, &hFF, &h66)

ctrl.GradientSettings.GradientStopColor = RGB(&h00, &h71, &h00)

End Sub


GradientStyle Property

Applies to: GradientSettings object

Sets or returns the gradient style that is used to fill the background of the GradientSettings owner object.

Syntax

object.GradientStyle [=Value]

Parameters

object

An expression that yields a GradientSettings object.

Value

A PeGradientStyle enumeration value defining the new style for the gradient drawing.

Remarks

The GradientStyle property has the type PeGradientStyle.

Example

The following example changes the GradientStyle property of the GradientSettings object:

VBScript

Sub GradientSettingsStartColorExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeValueIndicator)

ctrl.GradientSettings.GradientStartColor = &hFFBF00

ctrl.GradientSettings.GradientStopColor = &h715500

ctrl.GradientSettings.GradientStyle = peGradientStyleHorizontal3

End Sub


Height Property

Applies to the following objects: Analog120Meter | Analog180Meter | Analog270Meter | Analog360Meter | Bar | BitmapList | Button | Clock | Dial | HorizontalBar | HorizontalMeter | HorizontalSlider | Label | LED | PictureBox | RockerSwitch | Scene | Shape | ToggleSwitch | Trend | ValueEdit | ValueIndicator | VerticalBar | VerticalMeter | VerticalSlider

Sets or returns the height of the Instruments Panel object in pixels.

Syntax

object.Height [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A Long value defining the new height of the object.

Remarks

The Height property has the Long type.

The Height property of the Scene object is read-only.

Example

The following example sets the Height property of the Trend object:

VBScript

Sub NameExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeTrend)

ctrl.Height = 350

End Sub


Image Property

Instruments Panel Object Model | Reference

Applies to the following objects: Button | PictureBox

Sets or returns the image that is displayed on the object.

Syntax

object.Image [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A String value defining the image file.

Remarks

The Image property has the type String.

Example

The following example changes the Image property of the Button object:

VBScript

Sub ButtonImageExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeButton)

ctrl.Image = "Switch.bmp"

End Sub


ImageTransparent Property

Instruments Panel Object Model | Reference

Applies to the following objects: Button | Scene

Sets or returns whether the image or background image of a Instruments Panel object is drawn transparent.

Syntax

object.ImageTransparent [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

An Boolean value defining whether the image or background image is drawn transparent.

Remarks

The ImageTransparent property has the type Boolean.

Example

The following example changes the ImageTransparent property of a Scene and Button object:

VBScript

Sub ImageTransparentExample()

Dim doc, scene, button

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

scene.BackImage = "Warning.bmp"

scene.ImageTransparent = true

Set button = scene.Controls.Add(peControlTypeButton)

button.Image = "Switch.bmp"

button.ImageTransparent = true

End Sub


InactiveColor Property

Applies to the following objects: Dial | HorizontalSlider | VerticalSlider

Sets or returns the color that used to fill the pointer or button on the object mentioned above if this object control does not have the input focus.

Syntax

object.InactiveColor [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A Long value that specifies the new value of the property.

Remarks

The InactiveColor property has the type Long.

Example

The following example changes the InactiveColor property of the Dial object:

VBScript

Sub InactiveColorExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeDial)

ctrl.InactiveColor = vbMaroon

End Sub


ActiveScene Property

Applies to: Instruments Panel object

Returns the Scene object representing the active scene in the Instrument Panel object.

Syntax

object.ActiveScene

Parameters

object

An expression that yields a Instruments Panel object.

Remarks

The ActiveScene property returns a Scene object.

Example

The following example accesses the Scene object of the Instruments Panel object:

VBScript

Sub ActiveSceneExample()

Dim doc, panel, scene

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set panel = doc.ActiveWindow.Object

Set scene = panel.ActiveScene

' Insert code that uses the scene object

End Sub


RunMode Property

Applies to: Instruments Panel object

Sets or returns whether the instruments panel is locked and in the run mode.

Syntax

object.RunMode [=Value]

Parameters

object

An expression that yields a Instruments Panel object.

Value

A Boolean value defining whether the panel is locked and in run mode.

Remarks

The RunMode property has the type Boolean. If the RunMode property is False, the panel is in design mode.

Example

The following example changes the RunMode property of the Instruments Panel object:

VBScript

Sub RunModeExample()

' Before running this example, make sure an Instruments

' Panel window has the focus

Dim panel

Set panel = ActiveWindow.Object

' Insert code that uses the panel object

' ...

panel.RunMode = true

End Sub


Scenes Property

Applies to: Instruments Panel object

Returns the Scenes collection object representing all Scene objects in the Instruments Panel object.

Syntax

object.Scenes

Parameters

object

An expression that yields a Instruments Panel object.

Remarks

The Scenes property returns a Scenes object.

Example

The following example shows the names and switch values of all scenes of a Instruments Panel in the Output window:

VBScript

Sub ScenesExample()

Dim panel, i, scene

' Before execution, make sure a Instruments Panel window

' has the focus and the Output Window is open

Set panel = ActiveWindow.Object

For i = 1 To panel.Scenes.Count

Set scene = panel.Scenes.Item(i)

PrintToOutputWindow scene.Name & " = " & CStr(scene.SwitchValue)

Next

End Sub


IsEnabled Property

Applies to the following objects: Analog120Meter | Analog180Meter | Analog270Meter | Analog360Meter | Bar | BitmapList | Button | Clock | Dial | HorizontalBar | HorizontalMeter | HorizontalSlider | Label | LED | PictureBox | RockerSwitch | ToggleSwitch | Trend | ValueEdit | ValueIndicator | VerticalBar | VerticalMeter | VerticalSlider

Sets or returns whether the Instruments Panel control is enabled in run mode.

Syntax

object.IsEnabled [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A Boolean value that specifies whether the object is enabled or not in run mode.

Remarks

The IsEnabled property has the type Boolean.

Example

The following example disables a button in a panel:

VBScript

Sub IsEnabledExample()

' Before running this example, make sure an Instruments

' Panel window has the focus and the panel has a button

' named "Button1"

Dim panel, btn

Set panel = ActiveWindow.Object

panel.RunMode = true

Set btn = panel.ActiveScene.Controls("Button1")

btn.IsEnabled = false

End Sub


IsPaused Property

Applies to the following actor objects:

Button | Dial | HorizontalSlider | PictureBox | RockerSwitch | ToggleSwitch | ValueEdit | VerticalSlider

Sets or returns whether the cyclic transmission is paused.

Syntax

object.IsPaused [=Value]

Parameters

object

An expression that yields a control object.

Value

A Boolean value defining whether the cyclic transmission is paused.

Remarks

The IsPaused property has the Boolean type.

Example

The following example changes the IsPaused property of the Dial object to true:

VBScript

Sub IsPausedExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeDial)

ctrl.IsPaused = true

End Sub


IsVisible Property

Applies to the following objects: Analog120Meter | Analog180Meter | Analog270Meter | Analog360Meter | Bar | BitmapList | Button | Clock | Dial | HorizontalBar | HorizontalMeter | HorizontalSlider | Label | LED | PictureBox | RockerSwitch | Shape | ToggleSwitch | Trend | ValueEdit | ValueIndicator | VerticalBar | VerticalMeter | VerticalSlider

Sets or returns whether the Instruments Panel control is visible in run mode.

Syntax

object.IsVisible [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A Boolean value defining whether the object is visible or not in run mode.

Remarks

The IsVisible property has the type Boolean.

Example

The following example hides the first control in a panel:

VBScript

Sub IsVisibleExample()

' Before running this example, make sure an Instruments

' Panel window has the focus and the panel has at least

' one control

Dim panel, ctrl

Set panel = ActiveWindow.Object

panel.RunMode = true

Set ctrl = panel.ActiveScene.Controls(1)

ctrl.IsVisible = false

End Sub


TextAlign Property

Applies to: Label object

Sets or returns the position of the text within the Label object.

Syntax

object.TextAlign [=Value]

Parameters

object

An expression that yields a Label object.

Value

A PeContentAlignment enumeration value defining the new text position of the Label object.

Remarks

The TextAlign property has the type PeContentAlignment.

Example

The following example changes the TextAlign property of the Label object:

VBScript

Sub LabelTextAlignExample()

Dim doc, scene, label

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set label = scene.Controls.Add(peControlTypeLabel)

label.Caption = "Align Label"

label.Height = 30

label.TextAlign = peAlignMiddleCenter

End Sub


ValueFormat Property

Applies to: Label object

Sets or returns the format of the signal value displayed in the Label object.

Syntax

object.ValueFormat [=Value]

Parameters

object

An expression that yields a Label object.

Value

A PeLabelValueFormat enumeration value defining the new format of the signal value.

Remarks

The ValueFormat property has the type PeLabelValueFormat.

Example

The following example changes the ValueFormat property of the Label object:

VBScript

Sub LabelValueFormatExample()

Dim doc, scene, label

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set label = scene.Controls.Add(peControlTypeLabel)

label.Signal = Signals.Item("Speed")

label.ValueFormat = peValueFormatHex

End Sub


WordWrap Property

Applies to: Label object

Sets or returns whether the label text wraps when it is too long for the width of the Label object.

Syntax

object.WordWrap [=Value]

Parameters

object

An expression that yields a Label object.

Value

A Boolean value defining whether the label text will be wrapped.

Remarks

The WordWrap property has the type Boolean.

Example

The following example changes the WordWrap property of the Label object:

VBScript

Sub LabelWordWrapExample()

Dim doc, scene, label

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set label = scene.Controls.Add(peControlTypeLabel)

label.Caption = "WordWrap is enabled and TextAlign is peAlignMiddleCenter"

label.WordWrap = true

label.Height = 100

label.Width = 130

label.TextAlign = peAlignMiddleCenter

End Sub


Flashing Property

Applies to: LED object

Sets or returns whether the LED object is flashing in ON state.

Syntax

object.Flashing [=Value]

Parameters

object

An expression that yields an LED object.

Value

A Boolean value defining whether the LED is flashing.

Remarks

The Flashing property has the type Boolean.

Example

The following example changes the Flashing property of the LED object:

VBScript

Sub LEDFlashingExample()

Dim doc, scene, led

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set led = scene.Controls.Add(peControlTypeLED)

led.Signal = Signals.Item("Switch2")

led.Flashing = true

End Sub


Orientation Property

Applies to: LED object

Sets or returns how the LED graphic in the LED object is positioned in relation to its label.

Syntax

object.Orientation [=Value]

Parameters

object

An expression that yields an LED object.

Value

A PeLEDOrientation enumeration value defining the new position.

Remarks

The Orientation property has the type PeLEDOrientation.

Example

The following example changes the Orientation property of the LED object:

VBScript

Sub LEDOrientationExample()

Dim doc, scene, led

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set led = scene.Controls.Add(peControlTypeLED)

led.Orientation = peLEDOrientationRight

End Sub


Settings Property

Applies to: LED object

Returns the LEDSettings object representing a property object that bundles various settings for LEDs.

Syntax

object.Settings

Parameters

object

An expression that yields an LED object.

Remarks

The Settings property returns a LEDSettings object.

Example

The following example accesses the LEDSettings object of the LED object:

VBScript

Sub LEDSettingsExample()

Dim doc, scene, led

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set led = scene.Controls.Add(peControlTypeLED)

led.Settings.Shape = peLEDShapeRectangle

End Sub


Height Property

Applies to: LEDSettings object

Sets or returns the height of the owner LED in pixels.

Syntax

object.Height [=Value]

Parameters

object

An expression that yields an LEDSettings object.

Value

A Long value defining the new height value.

Remarks

The Height property has the type Long.

Example

The following example changes the Height property of the LEDSettings object:

VBScript

Sub LEDHeightExample()

Dim doc, scene, led

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set led = scene.Controls.Add(peControlTypeLED)

led.Shape = peLEDShapeRectangle

led.Height = 8

led.Width = 24

End Sub


Shape Property

Applies to: LEDSettings object

Sets or returns the shape of the owner LED.

Syntax

object.Shape [=Value]

Parameters

object

An expression that yields an LEDSettings object.

Value

A PeLEDShape enumeration value defining the new shape.

Remarks

The Shape property has the type PeLEDShape.

Example

The following example changes the Shape property of the LED object:

VBScript

Sub LEDShapeExample()

Dim doc, scene, led

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set led = scene.Controls.Add(peControlTypeLED)

led.Settings.Shape = peLEDShapeArrowLeft

End Sub


Width Property

Applies to: LEDSettings object

Sets or returns the width of the owner LED in pixels.

Syntax

object.Width [=Value]

Parameters

object

An expression that yields an LEDSettings object.

Value

A Long value defining the new width value.

Remarks

The Width property has the type Long.

Example

The following example changes the Width property of the LEDSettings object:

VBScript

Sub LEDWidthExample()

Dim doc, scene, led

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set led = scene.Controls.Add(peControlTypeLED)

led.Shape = peLEDShapeRectangle

led.Height = 8

led.Width = 24

End Sub


Threshold Property

Applies to: LED object

Sets or returns the threshold value at which the LED object switches from OFF to ON State and reverse.

Syntax

object.Threshold [=Value]

Parameters

object

An expression that yields an LED object.

Value

A Long value defining the new threshold value.

Remarks

The Threshold property has the type Long.

Example

The following example changes the Threshold property of the LED object:

VBScript

Sub LEDThresholdExample()

Dim doc, scene, led

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set led = scene.Controls.Add(peControlTypeLED)

led.Signal = Signals.Item("Switch2")

led.Threshold = 1

End Sub


Left Property

Applies to the following objects: Analog120Meter | Analog180Meter | Analog270Meter | Analog360Meter | Bar | BitmapList | Button | Clock | Dial | HorizontalBar | HorizontalMeter | HorizontalSlider | Label | LED | PictureBox | RockerSwitch | Shape | ToggleSwitch | Trend | ValueEdit | ValueIndicator | VerticalBar | VerticalMeter | VerticalSlider

Sets or returns the X-coordinate of the Instruments Panel object relative to the X-coordinate of its container.

Syntax

object.Left [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A Long value defining the new X-coordinate of the object.

Remarks

The Left property has the type Long.

Example

The following example sets the Left property of the Trend object:

VBScript

Sub LeftExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeTrend)

ctrl.Left = 10

End Sub


MinMax Property

Applies to the following objects: Analog120Meter | Analog180Meter | Analog270Meter | Analog360Meter | HorizontalBar | HorizontalMeter | VerticalBar | VerticalMeter

Returns a MinMax object, which stores attributes for minimum and maximum indicators on scales.

Syntax

object.MinMax

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Remarks

The MinMax property returns a MinMax object.

Example

The following example accesses the MinMax object of the Analog120Meter object:

VBScript

Sub MinMaxExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog120Meter)

ctrl.MinMax.ShowMinimum = true

End Sub


ShowMaximum Property

Applies to: MinMax object

Sets or returns whether a maximum indicator is shown for the MinMax owner object.

Syntax

object.ShowMaximum [=Value]

Parameters

object

An expression that yields a MinMax object.

Value

A Boolean value defining whether the maximum indicator is shown.

Remarks

The ShowMaximum property has the type Boolean.

Example

The following example changes the ShowMaximum property of the MinMax object:

VBScript

Sub ShowMaximumExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeVerticalMeter)

ctrl.MinMax.ShowMaximum = true

End Sub


ShowMinimum Property

Applies to: MinMax object

Sets or returns whether a minimum indicator is shown for the MinMax owner object.

Syntax

object.ShowMinimum [=Value]

Parameters

object

An expression that yields a MinMax object.

Value

A Boolean value defining whether the minimum indicator is shown.

Remarks

The ShowMinimum property has the type Boolean.

Example

The following example changes the ShowMinimum property of the MinMax object:

VBScript

Sub ShowMaximumExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeVerticalMeter)

ctrl.MinMax.ShowMinimum = true

End Sub


Name Property

Applies to the following objects: Analog120Meter | Analog180Meter | Analog270Meter | Analog360Meter | Bar | BitmapList | Button | Clock | Dial | HorizontalBar | HorizontalMeter | HorizontalSlider | Label | LED | PictureBox | RockerSwitch | Scene | Shape | ToggleSwitch | Trend | ValueEdit | ValueIndicator | VerticalBar | VerticalMeter | VerticalSlider

Sets or returns the name of the Instruments Panel object.

Syntax

object.Name [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A String value defining the new name of the object.

Remarks

The Name property has the type String.

Example

The following example sets the Name property of the Scene object:

VBScript

Sub NameExample()

Dim doc, scene

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

scene.Name = "FirstScene"

End Sub


Orientation Property

Instruments Panel Object Model | Reference

Applies to the following objects: RockerSwitch | ToggleSwitch

Sets or returns the switch orientation.

Syntax

object.Orientation [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A PeSwitchOrientation value defining the new orientation of the object.

Remarks

The Orientation property has the type PeSwitchOrientation.

Example

The following example changes the Orientation property of a RockerSwitch object:

VBScript

Sub OrientationExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeRockerSwitch)

ctrl.Orientation = peSwitchOrientationHorizontal

End Sub


OffValue Property

Instruments Panel Object Model | Reference

Applies to the following objects: RockerSwitch | ToggleSwitch

Sets or returns the value that is assigned to the signal when the switch is set to OFF state.

Syntax

object.OffValue [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A Long value that specifies the new value of the property.

Remarks

The OffValue property has the type Long.

Example

The following example changes the OffValue property of the ToggleSwitch object:

VBScript

Sub OffValueExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeToggleSwitch)

ctrl.OffValue = 0

ctrl.OnValue = 1

End Sub


OnValue Property

Instruments Panel Object Model | Reference

Applies to the following objects: RockerSwitch | ToggleSwitch

Sets or returns the value that is assigned to the signal when the switch is set to ON state.

Syntax

object.OnValue [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A Long value that specifies the new value of the property.

Remarks

The OnValue property has the type Long.

Example

The following example changes the OnValue property of the ToggleSwitch object:

VBScript

Sub OffValueExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeToggleSwitch)

ctrl.OffValue = 0

ctrl.OnValue = 1

End Sub


Parent Property

Applies to the following objects: Controls | Instruments Panel | Scenes

Returns the superordinate object of an object.

Syntax

object.Parent

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Remarks

The Parent property returns the direct superordinate object of an object or a collection. If the collection is required, that contains the object, the Collection property can be used.

The type of the Parent property is dependent on the object, the property of which is accessed (see table below).

The following table shows the respectively superordinate objects:

Object | Parent Object
Controls | Instruments Panel
Instruments Panel | Window (PCAN-Explorer object)
Scenes | Instruments Panel
Example

The following example accesses the superordinate object of an Instruments Panel:

VBScript

Sub ParentExample()

Dim doc, panel

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set panel = doc.ActiveWindow.Object

MsgBox panel.Parent.Caption

End Sub


SizeMode Property

Applies to: PictureBox object

Sets or returns how the PictureBox object will handle image placement and control sizing.

Syntax

object.SizeMode [=Value]

Parameters

object

An expression that yields a PictureBox object.

Value

A PePictureBoxSizeMode enumeration value defining how the PictureBox handles images.

Remarks

The SizeMode property has the type PePictureBoxSizeMode.

Example

The following example changes the SizeMode property of the PictureBox object:

VBScript

Sub PictureBoxSizeModeExample()

Dim doc, scene, picBox

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set picBox = scene.Controls.Add(peControlTypePictureBox)

picBox.ImageFile = "Switch.bmp"

picBox.SizeMode = peSizeModeAutoSize

End Sub


PointerSettings Property

Applies to the following objects: Analog120Meter | Analog180Meter | Analog270Meter | Analog360Meter

Returns a PointerSettings object, which represents the pointer of an analog meter.

Syntax

object.PointerSettings

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Remarks

The PointerSettings property returns a PointerSettings object.

Example

The following example accesses the PointerSettings object of the Analog120Meter object:

VBScript

Sub PointerSettingsExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog120Meter)

ctrl.PointerSettings.Shape = 6

End Sub


Shape Property

Applies to: PointerSettings object

Sets or returns the shape of the PointerSettings owner object pointer (0 - 7).

Syntax

object.Shape [=Value]

Parameters

object

An expression that yields a PointerSettings object.

Value

A Long value defining the new shape.

Remarks

The Shape property has the type Long and supports the values between 0 and 7.

Example

The following example changes the Shape property of the PointerSettings object:

VBScript

Sub PictureBoxSizeModeExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog120Meter)

ctrl.PointerSettings.Shape = 6

End Sub


PushValue Property

Instruments Panel Object Model | Reference

Applies to the following objects: Button | PictureBox

Sets or returns the value that is assigned to the signal when the mouse button is pushed on a Button or PictureBox object.

Syntax

object.PushValue [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A Long value defining the new push value.

Remarks

The PushValue property has the type Long.

Example

The following example changes the PushValue property of the Button object:

VBScript

Sub ButtonPushValueExample()

Dim doc, scene, button

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set bar = scene.Controls.Add(peControlTypeButton)

button.Signal = Signals.Item("Switch1")

button.PushValue = 1

button.ReleaseValue = 0

End Sub


ReleaseValue Property

Instruments Panel Object Model | Reference

Applies to the following objects: Button | PictureBox

Sets or returns the value that is assigned to the signal when the mouse button is released on a Button or PictureBox object.

Syntax

object.ReleaseValue [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A Long value defining the new release value.

Remarks

The ReleaseValue property has the type Long.

Example

The following example changes the ReleaseValue property of the Button object:

VBScript

Sub ButtonReleaseValueExample()

Dim doc, scene, button

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set bar = scene.Controls.Add(peControlTypeButton)

button.Signal = Signals.Item("Switch1")

button.PushValue = 1

button.ReleaseValue = 0

End Sub


LEDColorOff Property

Applies to: RockerSwitch object

Sets or returns the color that is used to draw the LED of the RockerSwitch object in OFF state.

Syntax

object.LEDColorOff [=Value]

Parameters

object

An expression that yields a RockerSwitch object.

Value

A Long value defining the new color value to use with rocker switch LED.

Remarks

The LEDColorOff property has the type Long.

Example

The following example changes the LEDColorOff property of the RockerSwitch object:

VBScript

Sub LEDColorOffExample()

Dim doc, scene, roSwitch

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set roSwitch = scene.Controls.Add(peControlTypeRockerSwitch)

roSwitch.LEDColorOff = RGB(&h00, &h55, &h71)

roSwitch.LEDColorOn = RGB(&h00, &hBF, &hFF)

roSwitch.LEDHeight = 8

End Sub


LEDColorOn Property

Applies to: RockerSwitch object

Sets or returns the color that is used to draw the LED of the RockerSwitch object in ON state.

Syntax

object.LEDColorOn [=Value]

Parameters

object

An expression that yields a RockerSwitch object.

Value

A Long value defining the new color value to use with rocker switch LED.

Remarks

The LEDColorOn property has the type Long.

Example

The following example changes the LEDColorOn property of the RockerSwitch object:

VBScript

Sub LEDColorOnExample()

Dim doc, scene, roSwitch

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set roSwitch = scene.Controls.Add(peControlTypeRockerSwitch)

roSwitch.LEDColorOff = RGB(&h00, &h55, &h71)

roSwitch.LEDColorOn = RGB(&h00, &hBF, &hFF)

roSwitch.LEDHeight = 8

End Sub


LEDHeight Property

Applies to: RockerSwitch object

Sets or returns the height for the LED of the RockerSwitch object.

Syntax

object.LEDHeight [=Value]

Parameters

object

An expression that yields a RockerSwitch object.

Value

A Long value defining the new height of the rocker switch LED.

Remarks

The LEDHeight property has the type Long.

Example

The following example changes the LEDHeight property of the RockerSwitch object:

VBScript

Sub LEDHeightExample()

Dim doc, scene, roSwitch

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set roSwitch = scene.Controls.Add(peControlTypeRockerSwitch)

roSwitch.LEDColorOff = RGB(&h00, &h55, &h71)

roSwitch.LEDColorOn = RGB(&h00, &hBF, &hFF)

roSwitch.LEDHeight = 8

End Sub


ScaleFont Property

Applies to the following objects: Analog120Meter | Analog180Meter | Analog270Meter | Analog360Meter | Dial | HorizontalMeter | HorizontalSlider | Trend | VerticalMeter | VerticalSlider

Returns a Font object that is used to draw the labels of a scale.

Syntax

object.ScaleFont

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Remarks

The ScaleFont property returns a Font object.

Example

The following example accesses the Font object of the Analog120Meter object:

VBScript

Sub ScaleFontExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog360Meter)

ctrl.ScaleFont.Italic = true

End Sub


ScaleSettings Property

Applies to the following objects: Analog120Meter | Analog180Meter | Analog270Meter | Analog360Meter | Dial | HorizontalMeter | HorizontalSlider | VerticalMeter | VerticalSlider

Returns a ScaleSettings object, which represents a scale of an Instruments Panel control.

Syntax

object.ScaleSettings

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Remarks

The ScaleSettings property returns a ScaleSettings object.

Example

The following example accesses the ScaleSettings object of the Analog120Meter object:

VBScript

Sub ScaleSettingsExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog120Meter)

ctrl.ScaleSettings.OptionsDrawBaseline = true

End Sub


DrawBaseline Property

Applies to: ScaleSettings object

Sets or returns whether a base line of the ScaleSettings owner object is drawn, which connects all scale marks.

Syntax

object.DrawBaseline [=Value]

Parameters

object

An expression that yields a ScaleSettings object.

Value

A Boolean value defining whether the base line of the owner object is drawn.

Remarks

The DrawBaseline property has the type Boolean.

Example

The following example changes the DrawBaseline property of the ScaleSettings object:

VBScript

Sub DrawBaselineExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog270Meter)

ctrl.ScaleSettings.DrawBaseline = true

End Sub


PointerBorderColor Property

Applies to: ScaleSettings object

Sets or returns the border color of the pointer of the ScaleSettings owner object.

Syntax

object.PointerBorderColor [=Value]

Parameters

object

An expression that yields a ScaleSettings object.

Value

A Long value defining the new border color of the pointer.

Remarks

The PointerBorderColor property has the type Long.

Example

The following example changes the PointerBorderColor property of the ScaleSettings object:

VBScript

Sub PointerBorderColorExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeVerticalMeter)

ctrl.ScaleSettings.PointerBorderColor = RGB(&h00, &h55, &h71)

ctrl.ScaleSettings.PointerColor = RGB(&h00, &hBF, &hFF)

End Sub


PointerColor Property

Applies to: ScaleSettings object

Sets or returns the color that is used to fill the pointer of the ScaleSettings owner object.

Syntax

object.PointerColor [=Value]

Parameters

object

An expression that yields a ScaleSettings object.

Value

A Long value defining the new fill color of the pointer.

Remarks

The PointerColor property has the type Long.

Example

The following example changes the PointerColor property of the ScaleSettings object:

VBScript

Sub PointerColorExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeVerticalMeter)

ctrl.ScaleSettings.PointerBorderColor = RGB(&h00, &h55, &h71)

ctrl.ScaleSettings.PointerColor = RGB(&h00, &hBF, &hFF)

End Sub


StepsMajor Property

Applies to: ScaleSettings object

Sets or returns the number of major steps the scale of the ScaleSettings owner object is devided into.

Syntax

object.StepsMajor [=Value]

Parameters

object

An expression that yields a ScaleSettings object.

Value

A Long value defining the new number of major steps.

Remarks

The StepsMajor property has the type Long.

Example

The following example changes the StepsMajor property of the ScaleSettings object:

VBScript

Sub StepsMajorExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog270Meter)

ctrl.ScaleSettings.StepsMajor = 10

ctrl.ScaleSettings.StepsMinor = 5

End Sub


StepsMinor Property

Applies to: ScaleSettings object

Sets or returns the number of steps between two major scale marks of the ScaleSettings owner object.

Syntax

object.StepsMinor [=Value]

Parameters

object

An expression that yields a ScaleSettings object.

Value

A Long value defining the new number of minor steps.

Remarks

The StepsMinor property has the type Long.

Example

The following example changes the StepsMinor property of the ScaleSettings object:

VBScript

Sub StepsMinorExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog270Meter)

ctrl.ScaleSettings.StepsMajor = 10

ctrl.ScaleSettings.StepsMinor = 5

End Sub


ActiveControl Property

Applies to: Scene object

Retrieves the currently focused Instruments Panel object of the Scene object.

Syntax

object.ActiveControl

Parameters

object

An expression that yields a Scene object.

Remarks

The ActiveControl property returns the currently focused Instruments Panel object.

Example

The following example retrieves the ActiveControl of the Scene object:

VBScript

Sub ActiveControlExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.ActiveControl

' Insert code that uses the active control

End Sub


BackImage Property

Applies to: Scene object

Sets or returns the image file to display in the background of the Scene object.

Syntax

object.BackImage [=Value]

Parameters

object

An expression that yields a Scene object.

Value

A String value defining the new background image file.

Remarks

The BackImage property has the type String.

Example

The following example changes the BackImage property of the Scene object:

VBScript

Sub BackImageExample()

Dim doc, scene

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

scene.BackImage = "Warning.bmp"

End Sub


Collection Property

Applies to: Scene object

Returns the collection containing the object supporting this property.

Syntax

object.Collection

Parameters

object

An expression that yields a Scene object.

Remarks

The Collection property returns a Scenes collection.

Example

The following example displays the number of scenes in the panel by accessing the Collection property:

VBScript

Sub CollectionExample()

Dim panel, scene

' An Instruments Panel window should be activated first

Set panel = ActiveWindow.Object

Set scene = panel.ActiveScene

MsgBox "Number of scenes: " & scene.Collection.Count

End Sub


Controls Property

Applies to: Scene object

Returns the Controls collection object.

Syntax

object.Controls

Parameters

object

An expression that yields a Scene object.

Remarks

The Controls property returns a Controls collection.

Example

The following example displays the number of controls in the active scene by accessing the Controls property:

VBScript

Sub ControlsExample()

Dim panel, scene

' An Instruments Panel window should be activated first

Set panel = ActiveWindow.Object

Set scene = panel.ActiveScene

MsgBox "Number of Controls: " & scene.Controls.Count

End Sub


ImageAlignment Property

Applies to: Scene object

Sets or returns the alignment of an image that is displayed in the background of a scene.

Syntax

object.ImageAlignments [=Value]

Parameters

object

An expression that yields a Scene object.

Value

A PeBackImageAlignment enumeration value defining the new alignment.

Remarks

The ImageAlignment property has the type PeBackImageAlignment.

Example

The following example changes the ImageAlignment property of the Scene object:

VBScript

Sub ImageAlignmentExample()

Dim doc, scene

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

scene.BackImage = "Warning.bmp"

scene.ImageAlignment = peBackImageAlignTile

End Sub


Index Property

Applies to: Scene object

Sets or returns the index of the Scene object.

Syntax

object.Index [=Value]

Parameters

object

An expression that yields a Scene object.

Value

A Long value defining the index of the Scene.

Remarks

The Index property has the type Long.

Example

The following example queries the Index of the Scene object:

VBScript

Sub IndexExample()

Dim doc, panel, scene

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set panel = doc.ActiveWindow.Object

Set scene = panel.Scenes.Add("SecondScene")

MsgBox "Scene Index: " & scene.Index

End Sub


IsActive Property

Applies to: Scene object

Sets or returns whether the Scene object is topmost scene in a panel.

Syntax

object.IsActive [=Value]

Parameters

object

An expression that yields a Scene object.

Value

An Boolean value defining whether the object is topmost scene.

Remarks

The IsActive property has the type Boolean.

Example

The following example changes the IsActive property of a newly added Scene object:

VBScript

Sub IsActiveExample()

Dim doc, panel, scene

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set panel = doc.ActiveWindow.Object

Set scene = panel.Scenes.Add("SecondScene")

scene.IsActive = true

End Sub


Next Property

Applies to: Scene object

Retrieves the next Scene object related to a particular Scene object.

Syntax

object.Next

Parameters

object

An expression that yields a Scene object.

Remarks

The Next property returns the next Scene object of the Instruments Panel object.

Example

The following example retrieves the next scene object related to the active scene:

VBScript

Sub NextExample()

Dim doc, panel, scene

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set panel = doc.ActiveWindow.Object

panel.Scenes.Add "SecondScene"

panel.Scenes.Add "ThirdScene"

Set scene = panel.ActiveScene.Next

MsgBox "Name of next scene: " & scene.Name

End Sub


Previous Property

Applies to: Scene object.

Retrieves the previous Scene object related to a particular Scene object.

Syntax

object.Previous

Parameters

object

An expression that yields a Scene object.

Remarks

The Previous property returns the previous Scene object of the Instruments Panel object.

Example

The following example retrieves the previous scene object related to the active scene:

VBScript

Sub PreviousExample()

Dim doc, panel, scene

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set panel = doc.ActiveWindow.Object

panel.Scenes.Add "SecondScene"

panel.Scenes.Add "ThirdScene"

Set scene = panel.ActiveScene.Previous

MsgBox "Name of previous scene: " & scene.Name

End Sub


SwitchValue Property

Applies to: Scene object

Sets or returns the signal threshold value at which the Scene object is being activated.

Syntax

object.SwitchValue [=Value]

Parameters

object

An expression that yields a Scene object.

Value

A Long value defining the new signal value.

Remarks

The SwitchValue property has the type Long.

Example

The following example changes the SwitchValue property of a Scene object:

VBScript

Sub SwitchValueExample()

Dim doc, scene

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

scene.SwitchValue = 1

End Sub


SectorSettings Property

Applies to the following objects: Analog120Meter | Analog180Meter | Analog270Meter | Analog360Meter | Bar | HorizontalBar | HorizontalMeter | VerticalBar | VerticalMeter

Returns a SectorSettings object, which represents the sector display in analog scales.

Syntax

object.SectorSettings

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Remarks

The SectorSettings property returns a SectorSettings object.

Example

The following example accesses the SectorSettings object of the Analog120Meter object:

VBScript

Sub SectorSettingsExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog120Meter)

ctrl.SectorSettings.Sector1From = 0

ctrl.SectorSettings.Sector1To = 20

ctrl.SectorSettings.Sector1Color = &hFF8000

ctrl.ShowSectors = true

End Sub


Offset Property

Applies to: SectorSettings object

Sets or returns the offset for the sectors of the SectorSettings owner object display in relation to the base line of the scale.

Syntax

object.Offset [=Value]

Parameters

object

An expression that yields a SectorSettings object.

Value

A Long value defining the new offset of the sectors.

Remarks

The Offset property has the type Long.

Example

The following example changes the Offset property of the SectorSettings object:

VBScript

Sub SectorSettingsOffsetExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog270Meter)

ctrl.SectorSettings.Offset = 2

ctrl.ShowSectors = true

End Sub


Sector1Color Property

Applies to: SectorSettings object

Sets or returns the color that is used to fill sector 1 of the SectorSettings owner object.

Syntax

object.Sector1Color [=Value]

Parameters

object

An expression that yields a SectorSettings object.

Value

A Long value defining the new color for sector 1.

Remarks

The Sector1Color property has the type Long.

Example

The following example changes the Sector1Color property of the SectorSettings object:

VBScript

Sub SectorSettingsSector1ColorExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog270Meter)

ctrl.SectorSettings.Sector1Color = vbBlue

ctrl.SectorSettings.Sector1From = 0

ctrl.SectorSettings.Sector1To = 100

ctrl.ShowSectors = true

End Sub


Sector1From Property

Applies to: SectorSettings object

Sets or returns the start of sector 1 of the SectorSettings owner object as a per mill value.

Syntax

object.Sector1From [=Value]

Parameters

object

An expression that yields a SectorSettings object.

Value

A Long value defining the new start of sector 1 per mill value.

Remarks

The Sector1From property has the type Long.

Example

The following example changes the Sector1From property of the SectorSettings object:

VBScript

Sub SectorSettingsSector1FromExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog270Meter)

ctrl.SectorSettings.Sector1Color = vbBlue

ctrl.SectorSettings.Sector1From = 0

ctrl.SectorSettings.Sector1To = 100

ctrl.ShowSectors = true

End Sub


Sector1To Property

Applies to: SectorSettings object

Sets or returns the end of sector 1 of the SectorSettings owner object as a per mill value.

Syntax

object.Sector1To [=Value]

Parameters

object

An expression that yields a SectorSettings object.

Value

A Long value defining the new end of sector 1 per mill value.

Remarks

The Sector1To property has the type Long.

Example

The following example changes the Sector1To property of the SectorSettings object:

VBScript

Sub SectorSettingsSector1ToExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog270Meter)

ctrl.SectorSettings.Sector1Color = vbBlue

ctrl.SectorSettings.Sector1From = 0

ctrl.SectorSettings.Sector1To = 100

ctrl.ShowSectors = true

End Sub


Sector2Color Property

Applies to: SectorSettings object

Sets or returns the color that is used to fill sector 2 of the SectorSettings owner object.

Syntax

object.Sector2Color [=Value]

Parameters

object

An expression that yields a SectorSettings object.

Value

A Long value defining the new color for sector 2.

Remarks

The Sector2Color property has the type Long.

Example

The following example changes the Sector2Color property of the SectorSettings object:

VBScript

Sub SectorSettingsSector2ColorExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog270Meter)

ctrl.SectorSettings.Sector2Color = vbGreen

ctrl.SectorSettings.Sector2From = 101

ctrl.SectorSettings.Sector2To = 900

ctrl.ShowSectors = true

End Sub


Sector2From Property

Applies to: SectorSettings object

Sets or returns the start of sector 2 of the SectorSettings owner object as a per mill value.

Syntax

object.Sector2From [=Value]

Parameters

object

An expression that yields a SectorSettings object.

Value

A Long value defining the new start of sector 2 per mill value.

Remarks

The Sector2From property has the type Long.

Example

The following example changes the Sector2From property of the SectorSettings object:

VBScript

Sub SectorSettingsSector2FromExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog270Meter)

ctrl.SectorSettings.Sector2Color = vbGreen

ctrl.SectorSettings.Sector2From = 101

ctrl.SectorSettings.Sector2To = 900

ctrl.ShowSectors = true

End Sub


Sector2To Property

Applies to: SectorSettings object

Sets or returns the end of sector 2 of the SectorSettings owner object as a per mill value.

Syntax

object.Sector2To [=Value]

Parameters

object

An expression that yields a SectorSettings object.

Value

A Long value defining the new end of sector 2 per mill value.

Remarks

The Sector2To property has the type Long.

Example

The following example changes the Sector2To property of the SectorSettings object:

VBScript

Sub SectorSettingsSector2ToExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog270Meter)

ctrl.SectorSettings.Sector2Color = vbGreen

ctrl.SectorSettings.Sector2From = 101

ctrl.SectorSettings.Sector2To = 900

ctrl.ShowSectors = true

End Sub


Sector3Color Property

Applies to: SectorSettings object

Sets or returns the color that is used to fill sector 3 of the SectorSettings owner object.

Syntax

object.Sector3Color [=Value]

Parameters

object

An expression that yields a SectorSettings object.

Value

A Long value defining the new color for sector 3.

Remarks

The Sector3Color property has the type Long.

Example

The following example changes the Sector3Color property of the SectorSettings object:

VBScript

Sub SectorSettingsSector3ColorExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog270Meter)

ctrl.SectorSettings.Sector3Color = vbRed

ctrl.SectorSettings.Sector3From = 901

ctrl.SectorSettings.Sector3To = 1000

ctrl.ShowSectors = true

End Sub


Sector3From Property

Applies to: SectorSettings object

Sets or returns the start of sector 3 of the SectorSettings owner object as a per mill value.

Syntax

object.Sector3From [=Value]

Parameters

object

An expression that yields a SectorSettings object.

Value

A Long value defining the new start of sector 3 per mill value.

Remarks

The Sector3From property has the type Long.

Example

The following example changes the Sector3From property of the SectorSettings object:

VBScript

Sub SectorSettingsSector3FromExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog270Meter)

ctrl.SectorSettings.Sector3Color = vbRed

ctrl.SectorSettings.Sector3From = 901

ctrl.SectorSettings.Sector3To = 1000

ctrl.ShowSectors = true

End Sub


Sector3To Property

Applies to: SectorSettings object

Sets or returns the end of sector 3 of the SectorSettings owner object as a per mill value.

Syntax

object.Sector3To [=Value]

Parameters

object

An expression that yields a SectorSettings object.

Value

A Long value defining the new end of sector 3 per mill value.

Remarks

The Sector3To property has the type Long.

Example

The following example changes the Sector3To property of the SectorSettings object:

VBScript

Sub SectorSettingsSector3ToExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog270Meter)

ctrl.SectorSettings.Sector3Color = vbRed

ctrl.SectorSettings.Sector3From = 901

ctrl.SectorSettings.Sector3To = 1000

ctrl.ShowSectors = true

End Sub


WidthOffset Property

Applies to: SectorSettings object

Sets or returns the width for the sectors of the SectorSettings owner object display relative to its auto-calculated width.

Syntax

object.WidthOffset [=Value]

Parameters

object

An expression that yields a SectorSettings object.

Value

A Long value defining the new width of the sectors.

Remarks

The WidthOffset property has the type Long.

Example

The following example changes the WidthOffset property of the SectorSettings object:

VBScript

Sub SectorSettingsWidthOffsetExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog270Meter)

ctrl.SectorSettings.WidthOffset = -2

ctrl.ShowSectors = true

End Sub


FillColor Property

Applies to: Shape object

Sets or returns the color used for filling the Shape object.

Syntax

object.FillColor [=Value]

Parameters

object

An expression that evaluates to a Shape object.

Value

A Long value that specifies the new filling color.

Remarks

The FillColor property has the type Long.

Example

The following example changes the FillColor property of a Shape object:

VBScript

Sub FillColorExample()

Dim doc, scene, shape

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set shape = scene.Controls.Add(peControlTypeShape)

shape.FillColor = vbRed

End Sub


FillStyle Property

Applies to: Shape object

Sets or returns the pattern used for filling the Shape object.

Syntax

object.FillStyle [=Value]

Parameters

object

An expression that evaluates to a Shape object.

Value

A PeFillStyle enumeration value defining the new filling pattern.

Remarks

The FillStyle property has the type PeFillStyle.

Example

The following example changes the FillStyle property of a Shape object:

VBScript

Sub FillStyleExample()

Dim doc, scene, shape

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set shape = scene.Controls.Add(peControlTypeShape)

shape.FillStyle = peFillStyleVertical

End Sub


Shape Property

Applies to: Shape object

Sets or returns the shape type of the Shape object.

Syntax

object.Shape [=Value]

Parameters

object

An expression that evaluates to a Shape object.

Value

A PeShapeType enumeration value defining the new shape.

Remarks

The Shape property has the type PeShapeType.

Example

The following example changes the Shape property of a Shape object:

VBScript

Sub ShapeExample()

Dim doc, scene, shape

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set shape = scene.Controls.Add(peControlTypeShape)

shape.FillColor = vbRed

shape.Shape = peShapeTypeEllipse

End Sub


ShowOverflow Property

Applies to the following objects: BarSettings | HorizontalBar | VerticalBar

Sets or returns whether overflow indicators of the objects mentioned above are shown.

Syntax

object.ShowOverflow [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A Boolean value defining whether the overflow indicators are shown.

Remarks

The ShowOverflow property has the type Boolean.

Example

The following example changes the ShowOverflow property of the VerticalBar object:

VBScript

Sub ShowOverflowExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeVerticalBar)

ctrl.ShowOverflow = false

End Sub


ShowSectors Property

Applies to the following objects: Analog120Meter | Analog180Meter | Analog270Meter | Analog360Meter | BarSettings | HorizontalMeter | VerticalMeter

Sets or returns whether sectors are shown for the Instruments Panel object.

Syntax

object.ShowSectors [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A Boolean value defining whether sectors are shown.

Remarks

The ShowSectors property has the type Boolean.

Example

The following example changes the ShowSectors property of the Analog120Meter object:

VBScript

Sub ShowSectorsExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog120Meter)

ctrl.ShowSectors = true

End Sub


ShowUnit Property

Applies to the following objects: Analog120Meter | Analog180Meter | Analog270Meter | Analog360Meter | Dial | HorizontalBar | HorizontalMeter | Label | ValueEdit | ValueIndicator | VerticalBar | VerticalMeter | VerticalSlider

Sets or returns whether the Instruments Panel object displays the physical unit of an associated signal.

Syntax

object.ShowUnit [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A Boolean value defining whether the object displays the physical unit.

Remarks

The ShowUnit property has the type Boolean.

Example

The following example changes the ShowUnit property of the Analog270Meter object:

VBScript

Sub ShowUnitExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog270Meter)

ctrl.Signal = Signals.Item("Speed")

ctrl.ShowUnit = true

End Sub


ShowValue Property

Applies to the following objects: BarSettings | Dial | HorizontalBar | VerticalBar | VerticalMeter | VerticalSlider

Sets or returns whether a value indicator is shown in the Instruments Panel object.

Syntax

object.ShowValue [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A Boolean value defining whether a value indicator is shown in the object.

Remarks

The ShowValue property has the type Boolean.

Example

The following example changes the ShowValue property of the Dial object:

VBScript

Sub ShowValueExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeDial)

ctrl.ShowValue = false

End Sub


Signal Property

Applies to the following objects: Analog120Meter | Analog180Meter | Analog270Meter | Analog360Meter | Bar | BitmapList | Button | Dial | HorizontalBar | HorizontalMeter | HorizontalSlider | Label | LED | PictureBox | RockerSwitch | ToggleSwitch | Trend | ValueEdit | ValueIndicator | VerticalBar | VerticalMeter | VerticalSlider

Sets or returns the PCAN-Explorer signal associated with the Instruments Panel object.

Syntax

object.Signal [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A PCAN-Explorer Signal object that is to be displayed by the object.

Remarks

The Signal property returns a PCAN-Explorer Signal object.

Example

The following example sets the Signal for the Label object:

VBScript

Sub SignalExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeLabel)

ctrl.Signal = Signals.Item("Speed")

End Sub


SignalFeedback Property

Applies to the following actor objects:

Dial | HorizontalSlider | RockerSwitch | ToggleSwitch | ValueEdit | VerticalSlider

Sets or returns whether the Instruments Panel object is updated when the Signal value was changed externally.

Syntax

object.SignalFeedback [=Value]

Parameters

object

An expression that yields a control object.

Value

A Boolean value defining whether the object is updated.

Remarks

The SignalFeedback property has the Boolean type.

Example

The following example changes the SignalFeedback property of the Dial object to False:

VBScript

Sub SignalFeedbackExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeDial)

ctrl.SignalFeedback = false

End Sub


SlotColor Property

Instruments Panel Object Model | Reference

Applies to the following objects: HorizontalSlider | VerticalSlider

Sets or returns the color that is used to paint the slot of the Slider object.

Syntax

object.SlotColor [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A Long value defining the new slot color of the Slider object.

Remarks

The SlotColor property has the type Long.

Example

The following example changes the SlotColor property of the HorizontalSlider object:

VBScript

Sub SlotColorExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeHorizontalSlider)

ctrl.SlotColor = vbMaroon

End Sub


SnapToScale Property

Applies to the following objects: Dial | HorizontalSlider | VerticalSlider

Sets or returns whether the slider or dial snaps to the scale marks when released.

Syntax

object.SnapToScale [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A Boolean value that sets the new value of the property.

Remarks

The SnapToScale property has the type Boolean.

Example

The following example changes the SnapToScale property of the Dial object:

VBScript

Sub SnapToScaleExample()

Dim doc, scene, dial

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set dial = scene.Controls.Add(peControlTypeDial)

dial.SnapToScale = true

End Sub


Source Property

Applies to the following actor objects:

Button | Dial | HorizontalSlider | PictureBox | RockerSwitch | ToggleSwitch | ValueEdit | VerticalSlider

Sets or returns the source address to transmit the signal which is connected to the Instruments Panel object.

This property can only used with the J1939 Add-in and the symbol type J1939PG.

Syntax

object.Source [=Value]

Parameters

object

An expression that yields a control object.

Value

A String value defining the source address for the connected signal. Values between "0" and "253" are supported. The constant value "null" can also be used. The default value of this property is an empty string and means that the PCAN-Explorer controls the addressing for the transmission of the signal and message.

Remarks

The Source property has the String type.

Example

The following example changes the source address of the VerticalSlider object:

VBScript

Sub SourceAddressExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeVerticalSlider)

ctrl.Source = "248"

ctrl.Destination = ""

End Sub


TextOff Property

Applies to: ToggleSwitch object

Sets or returns the text that the ToggleSwitch object displays in OFF state.

Syntax

object.TextOff [=Value]

Parameters

object

An expression that yields a ToggleSwitch object.

Value

A String value defining the new text for the OFF State.

Remarks

The TextOff property has the type String.

Example

The following example changes the TextOff property of the ToggleSwitch object:

VBScript

Sub ToggleSwitchTextOffExample()

Dim doc, scene, toggle

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set toggle = scene.Controls.Add(peControlTypeToggleSwitch)

toggle.Height = 35

toggle.Width = 65

toggle.TextOff = "Switch OFF"

toggle.TextOn = "Switch ON"

End Sub


TextOn Property

Applies to: ToggleSwitch object

Sets or returns the text that the ToggleSwitch object displays in ON state.

Syntax

object.TextOn [=Value]

Parameters

object

An expression that yields a ToggleSwitch object.

Value

A String value defining the new text for the ON State.

Remarks

The TextOn property has the type String.

Example

The following example changes the TextOn property of the ToggleSwitch object:

VBScript

Sub ToggleSwitchTextOnExample()

Dim doc, scene, toggle

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set toggle = scene.Controls.Add(peControlTypeToggleSwitch)

toggle.Height = 35

toggle.Width = 65

toggle.TextOff = "Switch OFF"

toggle.TextOn = "Switch ON"

End Sub


Top Property

Applies to the following objects: Analog120Meter | Analog180Meter | Analog270Meter | Analog360Meter | Bar | BitmapList | Button | Clock | Dial | HorizontalBar | HorizontalMeter | HorizontalSlider | Label | LED | PictureBox | RockerSwitch | Shape | ToggleSwitch | Trend | ValueEdit | ValueIndicator | VerticalBar | VerticalMeter | VerticalSlider

Sets or returns the Y-coordinate of the Instruments Panel object relative to the Y-coordinate of its container.

Syntax

object.Top [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A Long value defining the new Y-coordinate of the object.

Remarks

The Top property has the type Long.

Example

The following example sets the Top property of the Trend object:

VBScript

Sub TopExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeTrend)

scene.Top = 20

End Sub


Transparent Property

Applies to the following objects: Analog120Meter | Analog180Meter | Analog270Meter | Analog360Meter | Bar | Clock | HorizontalBar | HorizontalMeter | Label | PictureBox | Trend | ValueIndicator | VerticalBar | VerticalMeter

Sets or returns whether the background of the Instruments Panel object obscures objects below its self.

Syntax

object.Transparent [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A Boolean value that specifies whether the object background is transparent.

Remarks

The Transparent property has the type Boolean.

Example

The following example changes the Transparent property of the Analog120Meter object:

VBScript

Sub TransparentExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog120Meter)

ctrl.Transparent = true

End Sub


TrendBackColor Property

Applies to: Trend object

Sets or returns the color that is used to fill the display of the Trend object.

Syntax

object.TrendBackColor [=Value]

Parameters

object

An expression that yields a Trend object.

Value

A Long value defining new trend background color.

Remarks

The TrendBackColor property has the type Long.

Example

The following example changes the TrendBackColor property of the Trend object:

VBScript

Sub TrendBackColorExample()

Dim doc, scene, trend

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set trend = scene.Controls.Add(peControlTypeTrend)

trend.TrendBackColor = vbCream

End Sub


TrendGridColor Property

Applies to: Trend object

Sets or returns the color of the grid in the Trend object.

Syntax

object.TrendGridColor [=Value]

Parameters

object

An expression that yields a Trend object.

Value

A Long value defining the new trend grid color.

Remarks

The TrendGridColor property has the type Long.

Example

The following example changes the TrendGridColor property of the Trend object:

VBScript

Sub TrendGridColorExample()

Dim doc, scene, trend

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set trend = scene.Controls.Add(peControlTypeTrend)

trend.TrendGridColor = vbMaroon

End Sub


TrendHistory Property

Applies to: Trend object

Sets or returns the duration of the Trend object history in Minutes.

Syntax

object.TrendHistory [=Value]

Parameters

object

An expression that yields a Trend object.

Value

A Long value defining the new trend history in Minutes.

Remarks

The TrendHistory property has the type Long.

Example

The following example changes the TrendHistory property of the Trend object:

VBScript

Sub TrendHistoryExample()

Dim doc, scene, trend

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set trend = scene.Controls.Add(peControlTypeTrend)

trend.TrendHistory = 5

End Sub


TrendLineColor Property

Applies to: Trend object

Sets or returns the color of the lines in the Trend object.

Syntax

object.TrendLineColor [=Value]

Parameters

object

An expression that yields a Trend object.

Value

A Long value defining the new trend line color.

Remarks

The TrendLineColor property has the type Long.

Example

The following example changes the TrendLineColor property of the Trend object:

VBScript

Sub TrendLineColorExample()

Dim doc, scene, trend

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set trend = scene.Controls.Add(peControlTypeTrend)

trend.TrendLineColor = vbGreen

End Sub


TrendTimeIndColor Property

Applies to: Trend object

Sets or returns the color of the time indicator in the Trend object.

Syntax

object.TrendTimeIndColor [=Value]

Parameters

object

An expression that yields a Trend object.

Value

A Long value defining the new trend time indicator color.

Remarks

The TrendTimeIndColor property has the type Long.

Example

The following example changes the TrendTimeIndColor property of the Trend object:

VBScript

Sub TrendTimeIndColorExample()

Dim doc, scene, trend

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set trend = scene.Controls.Add(peControlTypeTrend)

trend.TrendTimeIndColor = vbGreen

End Sub


Type Property

Applies to the following objects: Analog120Meter | Analog180Meter | Analog270Meter | Analog360Meter | Bar | BitmapList | Button | Clock | Dial | HorizontalBar | HorizontalMeter | HorizontalSlider | Label | LED | PictureBox | RockerSwitch | Shape | ToggleSwitch | Trend | ValueEdit | ValueIndicator | VerticalBar | VerticalMeter | VerticalSlider

Returns a string indicating the type of an Instruments Panel object.

Syntax

object.Type

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A String value indicating the type of the object.

Property value

A String value that indicates the type of the object.

Example

The following example prints the type of an object to the Output window:

VBScript

Sub TypeExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog120Meter)

PrintToOutputWindow(ctrl.Type)

End Sub


UnitFont Property

Applies to the following objects: Analog120Meter | Analog180Meter | Analog270Meter | Analog360Meter | HorizontalBar | HorizontalMeter | Trend | ValueEdit | VerticalBar | VerticalMeter

Returns the Font object used to display unit text in the Instruments Panel object.

Syntax

object.UnitFont

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Remarks

The UnitFont property returns a Font object.

Example

The following example accesses the Font object of the Analog120Meter object:

VBScript

Sub UnitFontExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog120Meter)

ctrl.UnitFont.Underline = true

End Sub


UpdateSignal Property

Applies to the following objects: Dial | HorizontalSlider | VerticalSlider

Sets or returns whether the signal value is updated while the dial knob is turned or the Slider is moved in Instruments Panel objects.

Syntax

object.UpdateSignal [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A Boolean value defining whether the signal value is updated.

Remarks

The UpdateSignal property has the type Boolean.

Example

The following example changes the UpdateSignal property of the Dial object:

VBScript

Sub UpdateSignalExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeDial)

ctrl.Signal = Signals.Item("Speed")

ctrl.UpdateSignal = true

End Sub


UseSignalCycleTime Property

Applies to the following actor objects:

Button | Dial | HorizontalSlider | PictureBox | RockerSwitch | ToggleSwitch | ValueEdit | VerticalSlider

Sets or returns whether the default Signal cycle time is used for periodical transmission.

Syntax

object.UseSignalCycleTime [=Value]

Parameters

object

An expression that yields a control object.

Value

A Boolean value defining whether the default Signal cycle time is used.

Remarks

The UseSignalCycleTime property has the Boolean type.

Example

The following example changes the UseSignalCycleTime of the Dial object to false:

VBScript

Sub UseSigCycleTimeExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeDial)

ctrl.UseSignalCycleTime = false

End Sub


ShowValueRange Property

Applies to: ValueEdit object

Sets or returns whether the allowed range of values is displayed on the ValueEdit object.

Syntax

object.ShowValueRange [=Value]

Parameters

object

An expression that yields a ValueEdit object.

Value

An Boolean value defining if the value range is displayed on the object.

Remarks

The ShowValueRange property has the type Boolean.

Example

The following example changes the ShowValueRange property of the ValueEdit object:

VBScript

Sub ShowValueRangeExample()

Dim doc, scene, valEdit

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set valEdit = scene.Controls.Add(peControlTypeValueEdit)

valEdit.ShowValueRange = false

End Sub


Value Property

Applies to: ValueEdit object

Sets or returns the value text of a ValueEdit object.

Syntax

object.Value [=Value]

Parameters

object

An expression that yields a ValueEdit object.

Value

A String value that specifies the new value text for the object.

Remarks

The Value property has the String type.

Example

The following example gets the text that has been entered in a ValueEdit object and displays it in a message box:

VBS Macro

Sub ValueEditValueExample()

Dim panel, valEdit

Set panel = Documents("MyPanel.ipf").ActiveWindow.Object

Set valEdit = panel.Scenes(1).Controls("ValueEdit1")

MsgBox "Value = " & valEdit.Value

End Sub


ValueBackColor Property

Applies to: ValueEdit object

Sets or returns the color that is used to fill the background of the value edit field.

Syntax

object.ValueBackColor [=Value]

Parameters

object

An expression that yields a ValueEdit object.

Value

A Long value defining the new background color of the value field.

Remarks

The ValueBackColor property has the type Long.

Example

The following example changes the ValueBackColor property of the ValueEdit object:

VBS Macro

Sub ValueBackColorExample()

Dim doc, scene, valEdit

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set valEdit = scene.Controls.Add(peControlTypeValueEdit)

valEdit.ValueBackColor = vbCream

End Sub


ValueFont Property

Applies to the following objects: Dial | HorizontalBar | ValueEdit | ValueIndicator | VerticalBar | VerticalMeter | VerticalSlider

Returns a Font object, which represents the font that is used to display the signal value in a control.

Syntax

object.ValueFont

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Remarks

The ValueFont property returns a Font object.

Example

The following example accesses the Font object of the Dial object:

VBScript

Sub ValueFontExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeDial)

ctrl.ValueFont.Color = RGB(&hF0, &hF0, &hF0)

End Sub


ValueSettings Property

Applies to the following objects: Analog120Meter | Analog180Meter | Analog270Meter | Analog360Meter | Bar | Dial | HorizontalBar | HorizontalMeter | HorizontalSlider | Trend | ValueIndicator | VerticalBar | VerticalMeter | VerticalSlider

Returns a ValueSettings object, which stores attributes associated with the value display in Instruments Panel controls.

Syntax

object.ValueSettings

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Remarks

The ValueSettings property returns a ValueSettings object.

Example

The following example accesses the ValueSettings object of the Analog360Meter object:

VBScript

Sub ValueSettingsExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog360Meter)

ctrl.ValueSettings.DecimalPlaces = 2

End Sub


Maximum Property

Applies to: ValueSettings object

Sets or returns the maximum of the value range for the owner of the ValueSettings object.

Syntax

object.Maximum [=Value]

Parameters

object

An expression that yields a ValueSettings object.

Value

A Long value defining the new maximum for the value range.

Remarks

The Maximum property has the type Long.

Example

The following example changes the Maximum property of the ValueSettings object:

VBScript

Sub ValueSettingsMaximumExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog270Meter)

ctrl.ValueSettings.Minimum = -100

ctrl.ValueSettings.Maximum = 100

End Sub


Minimum Property

Applies to: ValueSettings object

Sets or returns the minimum of the value range for the owner of the ValueSettings object.

Syntax

object.Minimum [=Value]

Parameters

object

An expression that yields a ValueSettings object.

Value

A Long value defining the new minimum for the value range.

Remarks

The Minimum property has the type Long.

Example

The following example changes the Minimum property of the ValueSettings object:

VBScript

Sub ValueSettingsMinimumExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeAnalog270Meter)

ctrl.ValueSettings.Minimum = -100

ctrl.ValueSettings.Maximum = 100

End Sub


Width Property

Applies to the following objects: Analog120Meter | Analog180Meter | Analog270Meter | Analog360Meter | Bar | BitmapList | Button | Clock | Dial | HorizontalBar | HorizontalMeter | HorizontalSlider | Label | LED | PictureBox | RockerSwitch | Scene | Shape | ToggleSwitch | Trend | ValueEdit | ValueIndicator | VerticalBar | VerticalMeter | VerticalSlider

Sets or returns the width of the Instruments Panel object in pixels.

Syntax

object.Width [=Value]

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above.

Value

A Long value defining the new width of the object.

Remarks

The Width property has the Long type.

The Width property of the Scene object is read-only.

Example

The following example sets the Width property of the Trend object:

VBScript

Sub NameExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeTrend)

ctrl.Width = 500

End Sub


Methods

The following methods are available:

Method | Description
Add [Variation 1] | Adds a new Instruments Panel object to the Controls collection.
Add [Variation 2] | Adds a new Scene object to the Scenes collection.
AddBitmap | Adds a new image to the BitmapList object.
ClearAll | Removes all Instruments Panel objects from the Controls collection.
ClearAll | Removes all Scene objects from the Scenes collection.
ClearBitmaps | Removes all images from the BitmapList object.
Item | Queries an Instruments Panel object of the Controls collection.
Item | Queries a Scene object from the Scenes collection.
LockUpdate | Locks a Scene object while updating properties or creating Instruments Panel objects.
Remove | Removes an Instruments Panel object from the Controls collection.
RemoveAll | Removes a Scene object from the Scenes collection.
RemoveBitmap | Removes an image from the BitmapList object.

See also

Instruments Panel Object Model

Diagram of the Object Model


AddBitmap Method

Applicable to: BitmapList object

Adds a new picture to the BitmapList object.

Syntax

object.AddBitmap ( Filename, SignalValue )

Parameters

object

An expression that evaluates to a BitmapList object.

Filename

A String representing the file name of the picture to be added.

SignalValue

A Double representing the signal value for the picture to be added.

Return value

The AddBitmap method returns a Boolean value:

  • True: The picture has been successfully added.

  • False: An error occurred.

Example

The following example adds a new picture to the BitmapList.

VBScript

Sub AddBitmapExample()

Dim doc, scene, bmpList, res

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set bmpList = scene.Controls.Add(peControlTypeBitmapList)

res = bmpList.AddBitmap("C:\Temp\vehicle.bmp", 1)

If res = True Then

' Insert code to do something with the added picture

Else

' Adding the bitmap failed

End If

End Sub


ClearBitmaps Method

Applicable to: BitmapList object

Removes all pictures from the BitmapList object.

Syntax

object.ClearBitmaps

Parameters

object

An expression that yields a BitmapList object.

Example

The following example removes all pictures from a selected BitmapList object.

VBScript

Sub ClearBitmapsExample()

Dim actScene, bmpList

' Before starting, make sure a

' Instruments Panel window and the

' BitmapList has the focus

Set actScene = ActiveWindow.Object.ActiveScene

Set bmpList = ActScene.ActiveControl

bmpList.ClearBitmaps

End Sub


RemoveBitmap Method

Applicable to: BitmapList object

Removes an existing picture from the BitmapsList object.

Syntax

object.RemoveBitmap ( Index )

Parameters

object

An expression that yields a BitmapList object.

Index

A Long value which represents corresponding object.

Return value

The RemoveBitmap method returns a Boolean value:

  • True: The picture has been successfully removed.

  • False: An error occurred.

Example

The following example remove the first picture from a selected BitmapList object.

VBScript

Sub ClearBitmapsExample()

Dim actScene, bmpList

' Before starting, make sure a

' Instruments Panel window and the

' BitmapList has the focus.

' The BitmapList should have at least

' one picture inside the list.

Set actScene = ActiveWindow.Object.ActiveScene

Set bmpList = ActScene.ActiveControl

' Remove the first picture from the list.

bmpList.RemoveBitmap(0)

End Sub


Add Method

Applicable to: Controls

Adds a new Instruments Panel object to the Controls collection.

Syntax

object.Add ( Type )

Parameters

object

An expression that evaluates to a Controls collection.

Type

A String representing the type name of the new Instruments Panel object. See Control Types for a list of possible values.

Return value

The Add method returns the newly created Instruments Panel object.

Example

The following example adds a new object to a Instruments Panel scene:

VBScript

Sub AddControlExample()

Dim doc, scene, ctrl

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set scene = doc.ActiveWindow.Object.ActiveScene

Set ctrl = scene.Controls.Add(peControlTypeDial)

' Insert code to do something with the new object

End Sub


ClearAll Method

Applicable to: Controls

Removes all Instruments Panel objects from the Controls collection.

Syntax

object.ClearAll

Parameters

object

An expression that evaluates to a Controls collection.

Example

The following example clears all objects from the active Instruments Panel scene:

VBScript

Sub ControlClearAllExample()

' Before running this example, make sure an

' Instruments Panel window has the focus

Dim scene

Set scene = ActiveWindow.Object.ActiveScene

scene.Controls.ClearAll

End Sub


Item Method

Applicable to: Controls

Queries an Instruments Panel object of the Controls collection.

Syntax

object.Item ( Index )

Parameters

object

An expression that yields a Controls collection object.

Index

A Variant, being either a Long value or a String, which represents corresponding object.

  • If a Long value is specified, the Item method returns the object via its one-based index in the collection.

  • If a String is specified, the Item method returns the object via its name, as it is defined in its Name property.

Remarks

If numerical values are given for index, these shouldn't be saved for further use, since the objects' indices can change, when objects are removed from or new ones are added to the collection.

The Item method is the default method of a collection. Therefore the Item method doesn't need to be specified explicitly.

Example

The following example shows the names of all controls of a Instruments Panel scene in the Output window:

VBScript

Sub ItemExample()

' Before execution, make sure a Instruments Panel window

' has the focus and the Output Window is open.

Dim scene, i, ctrl

Set scene = ActiveWindow.Object.ActiveScene

For i = 1 To scene.Controls.Count

Set ctrl = scene.Controls.Item(i)

PrintToOutputWindow ctrl.Name

Next

End Sub


Remove Method

Applicable to: Controls

Removes an Instruments Panel object from the Controls collection.

Syntax

object.Remove ( Name )

Parameters

object

An expression that yields a Controls object.

Name

A String representing the name of the Instruments Panel object that shall be removed.

Example

The following example removes an object of the active Instruments Panel scene:

VBScript

Sub ControlRemoveExample()

' Before running this example, make sure that an

' Instruments Panel window has the focus and that

' an object with name "VerticalBar1" exists

Dim scene

Set scene = ActiveWindow.Object.ActiveScene

scene.Controls.Remove("VerticalBar1")

End Sub


LockUpdate Method

Applicable to: Scene

Locks a Scene object while updating properties or creating Instruments Panel objects.

Syntax

object.LockUpdate ( Lock )

Parameters

object

An expression that evaluates to a Scene object.

Lock

A Boolean value that specifies whether the scene should be locked.

Example

The following example locks a scene object while adds a new object and modifies their properties:

VBScript

Sub LockUpdateExample()

Dim panel, scene, ctrl

' Before execution, make sure a Instruments Panel window

' has the focus

Set panel = ActiveWindow.Object

Set scene = panel.ActiveScene

scene.LockUpdate True

Set ctrl = CreateAnalog270Object(scene)

ctrl.Left = 10

ctrl.Top = 10

ctrl.Width = 200

ctrl.Height = 250

scene.LockUpdate False

End Sub

Private Function CreateAnalog270Object(sceneObj)

Dim ctrl

Set ctrl = sceneObj.Controls.Add(peControlTypeAnalog270Meter)

ctrl.BevelOuter.BorderColor = vbBlack

ctrl.BevelOuter.BorderWidth = 2

ctrl.GradientSettings.GradientStartColor = RGB(&h00, &hBF, &hFF)

ctrl.GradientSettings.GradientStopColor = RGB(&h00, &h55, &h71)

ctrl.GradientSettings.GradientStyle = peGradientStyleElliptic1

ctrl.Font.Color = vbWhite

ctrl.Font.Size = 8

ctrl.Font.Bold = True

ctrl.UnitFont.Color = vbWhite

ctrl.UnitFont.Size = 10

ctrl.ScaleFont.Color = vbWhite

ctrl.ScaleFont.Size = 10

ctrl.ScaleSettings.StepsMajor = 10

ctrl.ScaleSettings.StepsMinor = 5

ctrl.ScaleSettings.DrawBaseline = True

ctrl.ScaleSettings.Color = vbWhite

ctrl.PointerSettings.Shape = 6

ctrl.SectorSettings.Offset = 2

ctrl.SectorSettings.WidthOffset = -2

ctrl.SectorSettings.Sector1Color = vbBlue

ctrl.SectorSettings.Sector1From = 0

ctrl.SectorSettings.Sector1To = 100

ctrl.SectorSettings.Sector2Color = vbGreen

ctrl.SectorSettings.Sector2From = 101

ctrl.SectorSettings.Sector2To = 900

ctrl.SectorSettings.Sector3Color = vbRed

ctrl.SectorSettings.Sector3From = 901

ctrl.SectorSettings.Sector3To = 1000

ctrl.ShowSectors = True

Set CreateAnalog270Object = ctrl

End Function


Add Method

Applicable to: Scenes

Adds a new Scene to the Scenes collection.

Syntax

object.Add ( Name )

Parameters

object

An expression that yields a Scenes collection.

Name

A String representing the name of the new Instruments Panel scene.

Remarks

The Add method returns the newly created Instruments Panel scene.

Example

The following example adds a new scene to the Instruments Panel:

VBScript

Sub AddSceneExample()

Dim doc, panel, scene

Set doc = Documents.Add(peDocumentKindInstrumentsPanel)

Set panel = doc.ActiveWindow.Object

Set scene = panel.Scenes.Add("SecondScene")

' Insert code to do something with the new scene

End Sub


ClearAll Method

Applicable to: Scenes

Removes all Scene objects from the Scenes collection.

Syntax

object.ClearAll

Parameters

object

An expression that evaluates to a Scenes collection.

Example

The following example clears all scenes of the Instruments Panel:

VBScript

Sub SceneClearAllExample()

' Before running this example, make sure that an

' Instruments Panel window has the focus

Dim panel

Set panel = ActiveWindow.Object

panel.Scenes.ClearAll

End Sub


Item Method

Applicable to: Scenes

Queries a Scene object of the Scenes collection.

Syntax

object.Item ( Index )

Parameters

object

An expression that yields a Scenes collection object.

Index

A Variant, being either a Long value or a String, which represents the corresponding object.

  • If a Long value is specified, the Item method returns the object via its one-based index in the collection.

  • If a String is specified, the Item method returns the object via its name, as it is defined in its Name property.

Remarks

If numerical values are given for index, these shouldn't be saved for further use, since the objects' indices can change, when objects are removed from or new ones are added to the collection.

The Item method is the default method of a collection. Therefore the Item method doesn't need to be specified explicitly.

Example

The following example shows the names of all scenes of a Instruments Panel in the Output window:

VBScript

Sub ItemExample()

' Before running this example, make sure an Instruments Panel

' window has the focus and the Output Window is open

Dim panel, i, scene

Set panel = ActiveWindow.Object

For i = 1 To panel.Scenes.Count

Set scene = panel.Scenes.Item(i)

PrintToOutputWindow scene.Name

Next

End Sub


Remove Method

Applicable to: Scenes

Removes a Scene object from the Scenes collection.

Syntax

object.Remove ( Name )

Parameters

object

An expression that yields a Scene object.

Name

A String representing the name of the Instruments Panel scene that shall be removed.

Remarks

If the last scene has been removed from the Scenes collection, the panel automatically creates a new empty scene. The scenes collection may be completely empty.

Example

The following example removes a scene of the Instruments Panel:

VBScript

Sub RemoveSceneExample()

' Before running this example, make sure an Instruments

' Panel window has the focus that contains at least two

' scenes, and that a scene with the name 'Scene2' exists

Dim panel

Set panel = ActiveWindow.Object

panel.Scenes.Remove("Scene2")

End Sub


Enumerations

The following enumerations are available:

Enumeration | Description
PeBackImageAlignment | Specifies the alignment of a background image on the scene.
PeBarStyle | Specifies the bar style of a panel control drawing surface.
PeBorderStyle | Specifies the border style of a panel control drawing surface.
PeClockFormat | Specifies the display format of a Clock control.
PeContentAlignment | Specifies alignment of content on the drawing surface.
PeDialPointer | Specifies the pointer of a Dial control.
PeFillStyle | Specifies the pattern used for filling a shape.
PeGradientStyle | Specifies the background gradient style of a panel control drawing surface.
PeImageAlignment | Specifies the alignment of an image on the Button control.
PeLabelValueFormat | Specifies the format of signal values shown in a label.
PeLEDOrientation | Specifies the LED orientation of a panel control drawing surface.
PeLEDShape | Specifies the LED shape of a panel control drawing surface.
PePictureBoxSizeMode | Describes how an image control handles image placement and control sizing.
PeShapeType | Specifies the shape shown in a Shape control.
PeSwitchOrientation | Specifies the orientation of a RockerSwitch and ToggleSwitch control.

See also

Instruments Panel Object Model

Diagram of the Object Model


PeBackImageAlignment Enumeration

Applicable to: Scene.ImageAlignment

Specifies the alignment of a background image on the scene.

The PeBackImageAlignment Enumeration has following values:

Value | Enum Value | Description
0 | peBackImageAlignCenter | Center
1 | peBackImageAlignTile | Tile
2 | peBackImageAlignStretch | Stretch
3 | peBackImageAlignLeft | Left
4 | peBackImageAlignTop | Top
5 | peBackImageAlignRight | Right
6 | peBackImageAlignBottom | Bottom
7 | peBackImageAlignTopLeft | Top-Left
8 | peBackImageAlignTopRight | Top-Right
9 | peBackImageAlignBottomRight | Bottom-Right
10 | peBackImageAlignBottomLeft | Bottom-Left

See also

Instruments Panel Object Model

Diagram of the Object Model


PeBarStyle Enumeration

Applicable to: BarSettings.Style

Specifies the bar style of a panel control drawing surface.

The PeBarStyle Enumeration has following values:

Value | Enum Value | Description
0 | peBar | Bar
1 | peLED | LED
2 | peLine | Line

See also

Instruments Panel Object Model

Diagram of the Object Model


PeBorderStyle Enumeration

Applicable to: Bevel.BorderStyle

Specifies the bar style of a panel control drawing surface.

The PeBorderStyle Enumeration has following values:

Value | Enum Value | Description
0 | peBorderStyleLowered | Lowered
1 | peBorderStyleRaised | Raised
2 | peBorderStyleFlat | Flat

See also

Instruments Panel Object Model

Diagram of the Object Model


PeClockFormat Enumeration

Applicable to: Clock.ClockFormat

Specifies the display format of a Clock control.

The PeClockFormat Enumeration has following values:

Value | Enum Value | Description
0 | peClockFormatDate | Date <01.02.2067>
1 | peClockFormatTime | Time <12:45:38>
2 | peClockFormatDateTime | Date & Time <01.02.2067 12:45:38>

See also

Instruments Panel Object Model

Diagram of the Object Model


PeContentAlignment Enumeration

Applicable to: Label.TextAlign

Specifies alignment of content on the drawing surface.

The PeContentAlignment Enumeration has following values:

Value | Enum Value | Description
0 | peAlignTopLeft | Top-left
1 | peAlignTopCenter | Top-center
2 | peAlignTopRight | Top-right
3 | peAlignMiddleLeft | Middle-left
4 | peAlignMiddleCenter | Middle-center
5 | peAlignMiddleRight | Middle-right
6 | peAlignBottomLeft | Bottom-left
7 | peAlignBottomCenter | Bottom-center
8 | peAlignBottomRight | Bottom-right

See also

Instruments Panel Object Model

Diagram of the Object Model


PeDialPointer Enumeration

Applicable to: Dial.PointerType

Specifies the pointer of a Dial control.

The PeDialPointer Enumeration has following values:

Value | Enum Value | Description
0 | peDialPointerRound | Round
1 | peDialPointerLine | Line
2 | peDialPointerTriangle | Triangle

See also

Instruments Panel Object Model

Diagram of the Object Model


PeFillStyle Enumeration

Applicable to: Shape.FillStyle property

Specifies the pattern used for filling a shape.

The PeFillStyle Enumeration has following values:

Value | Enum Value | Pattern
0 | peFillStyleSolid |
1 | peFillStyleClear |
2 | peFillStyleHorizontal |
3 | peFillStyleVertical |
4 | peFillStyleDiagonal1 |
5 | peFillStyleDiagonal2 |
6 | peFillStyleCross |
7 | peFillStyleDiagCross |

See also

Instruments Panel Object Model

Diagram of the Object Model


PeGradientStyle Enumeration

Applicable to: GradientSettings.GradientStyle

Specifies the background gradient style of a panel control drawing surface.

The PeGradientStyle Enumeration has following values:

Value | Enum Value | Description
0 | peGradientStyleHorizontal1 | Horizontal1
1 | peGradientStyleHorizontal2 | Horizontal2
2 | peGradientStyleHorizontal3 | Horizontal3
3 | peGradientStyleVertical1 | Vertical1
4 | peGradientStyleVertical2 | Vertical2
5 | peGradientStyleVertical3 | Vertical3
6 | peGradientStyleElliptic1 | Elliptic1
7 | peGradientStyleElliptic2 | Elliptic2
8 | peGradientStyleElliptic3 | Elliptic3
9 | peGradientStyleRectangle | Rectangle
10 | peGradientStyleDiamond1 | Diamond1
11 | peGradientStyleDiamond2 | Diamond2
12 | peGradientStyleTopLeft | Top Left
13 | peGradientStyleTopRight | Top Right

See also

Instruments Panel Object Model

Diagram of the Object Model


PeImageAlignment Enumeration

Applicable to: Button.ImageAlign

Specifies the alignment of an image on the Button control.

The PeImageAlignment Enumeration has following values:

Value | Enum Value | Description
0 | peImageAlignCenter | Center
1 | peImageAlignLeft | Left
2 | peImageAlignTopLeft | Top-Left
3 | peImageAlignTop | Top
4 | peImageAlignTopRight | Top-Right
5 | peImageAlignRight | Right
6 | peImageAlignBottomRight | Bottom-Right
7 | peImageAlignBottom | Bottom
8 | peImageAlignBottomLeft | Bottom-Left

See also

Instruments Panel Object Model

Diagram of the Object Model


PeLabelValueFormat Enumeration

Applicable to: Label.ValueFormat

Specifies the format of signal values shown in a Label.

The PeLabelValueFormat Enumeration has following values:

Value | Enum Value | Description
0 | peValueFormatDefault | Signal Default
1 | peValueFormatShortest | Shortest
2 | peValueFormatFixed | Fixed
3 | peValueFormatScientific | Scientific
4 | peValueFormatHex | Hexadecimal
5 | peValueFormatBin | Binary

See also

Instruments Panel Object Model

Diagram of the Object Model


PeLEDOrientation Enumeration

Applicable to: LED.Orientation

Specifies the LED orientation of a panel control drawing surface.

The PeLEDOrientation Enumeration has following values:

Value | Enum Value | Description
0 | peLEDOrientationLeft | Left
1 | peLEDOrientationRight | Right
2 | peLEDOrientationTop | Top
3 | peLEDOrientationBottom | Bottom

See also

Instruments Panel Object Model

Diagram of the Object Model


PeLEDShape Enumeration

Applicable to: LED.Settings.Shape

Specifies the LED shape of a panel control drawing surface.

The PeLEDShape Enumeration has following values:

Value | Enum Value | Description
0 | peLEDShapeRound | Round
1 | peLEDShapeArrowLeft | Arrow Left
2 | peLEDShapeArrowRight | Arrow Right
3 | peLEDShapeArrowUp | Arrow Up
4 | peLEDShapeArrowDown | Arrow Down
5 | peLEDShapeRectangle | Rectangle

See also

Instruments Panel Object Model

Diagram of the Object Model


PePictureBoxSizeMode Enumeration

Applicable to: PictureBox.SizeMode

Describes how an image control handles image placement and control sizing.

The PePictureBoxSizeMode Enumeration has following values:

Value | Enum Value | Description
0 | peSizeModeNormal | Normal
1 | peSizeModeStretchImage | Stretch Image
2 | peSizeModeAutoSize | Auto-Size
3 | peSizeModeCenterImage | Center Image

See also

Instruments Panel Object Model

Diagram of the Object Model


PeShapeType Enumeration

Applicable to: Shape.Shape property

Specifies the shape of a Shape control.

The PeShapeType Enumeration has following values:

Value | Enum Value | Description
0 | peShapeTypeCircle | Circle
1 | peShapeTypeEllipse | Ellipse
2 | peShapeTypeRectangle | Rectangle
3 | peShapeTypeRoundRect | Rounded rectangle
4 | peShapeTypeRoundSquare | Rounded square
5 | peShapeTypeSquare | Square

See also

Instruments Panel Object Model

Diagram of the Object Model


PeSwitchOrientation Enumeration

Applicable to: RockerSwitch.Orientation and ToggleSwitch.Orientation

Specifies the orientation of a RockerSwitch and ToggleSwitch control.

The PeSwitchOrientation Enumeration has following values:

Value | Enum Value | Description
0 | peSwitchOrientationHorizontal | Horizontal
1 | peSwitchOrientationVertical | Vertical

See also

Instruments Panel Object Model

Diagram of the Object Model


Control Types

The following table contains all control types that are available in the Instruments Panel:

Control Type | Description
peControlTypeAnalog120Meter | Represents the Analog120Meter control.
peControlTypeAnalog180Meter | Represents the Analog180Meter control.
peControlTypeAnalog270Meter | Represents the Analog270Meter control.
peControlTypeAnalog360Meter | Represents the Analog360Meter control.
peControlTypeBar | Represents the Bar control.
peControlTypeBitmapList | Represents the BitmapList control.
peControlTypeButton | Represents the Button control..
peControlTypeClock | Represents the Clock control.
peControlTypeDial | Represents the Dial control.
peControlTypeHorizontalBar | Represents the HorizontalBar control.
peControlTypeHorizontalMeter | Represents the HorizontalMeter control.
peControlTypeHorizontalSlider | Represents the HorizontalSlider control.
peControlTypeLabel | Represents the Label control.
peControlTypeLED | Represents the LED control.
peControlTypePictureBox | Represents the PictureBox control.
peControlTypeRockerSwitch | Represents the RockerSwitch control.
peControlTypeToggleSwitch | Represents the ToggleSwitch control.
peControlTypeTrend | Represents the Trend control.
peControlTypeShape | Represents the Shape control.
peControlTypeValueEdit | Represents the ValueEdit control.
peControlTypeValueIndicator | Represents the ValueIndicator control.
peControlTypeVerticalBar | Represents the VerticalBar control.
peControlTypeVerticalMeter | Represents the VerticalMeter control.
peControlTypeVerticalSlider | Represents the VerticalSlider control.


Analog Meter 120°


Analog Meter 180°


Analog Meter 270°


Analog Meter 360°


Horizontal Analog Meter


Vertical Analog Meter


Bar Graph


Horizontal Bar Graph


Vertical Bar Graph


Bitmap List

Example bitmaps


Button


Clock


Dial Control


Picture

Example: arbitrary image


Label

Static text


LED


Shape

Example: different shape types


Horizonal Slider Control

Horizontal Slider Control


Vertical Slider Control


Rocker Switch


Toggle Switch


Trend

Trend (Line writer)


Value Edit


Value Indicator


About

Instruments Panel HTML Help

for Instruments Panel Add-in Version 6.0

Last update: 2021-04-29 9:11 AM

© 2016 PEAK-System Technik GmbH, Darmstadt, Germany
All rights reserved.