VB script and instrument panel

Comprehensive CAN monitor for Windows® and its add-ins: Plotter, CANdb Import, Instruments Panel, and J1939
Post Reply
JPS7495
Posts: 9
Joined: Fri 18. Dec 2015, 10:38

VB script and instrument panel

Post by JPS7495 » Fri 18. Dec 2015, 10:45

Hello all,

I want to access instrument panel controls (bitmaplist, bargraph,labels..) in VBS script and be able to modify many things (font, colour, position ).
How can I do this?

thanks

K.Wolf
Software Development
Software Development
Posts: 141
Joined: Wed 22. Sep 2010, 15:37

Re: VB script and instrument panel

Post by K.Wolf » Mon 21. Dec 2015, 08:21

Here's a short example on how to access panel objects in a VBS macro:

Code: Select all

Dim panel, obj
Set panel = Documents("MyPanel.ipf").ActiveWindow.Object
Set obj = panel.ActiveScene.Controls("Label1")
obj.Left = 100
obj.Font.Color = vbRed
Press F1 in a panel window to open the Instruments Panel Help. Under "Reference -> Instruments Panel Object Model" you can find a list of available objects and their properties, which you can access in a macro.

Post Reply