Read UI element using VBS marco

Professional Windows® software to communicate with CAN and CAN FD busses and its add-ins: Plotter, CANdb Import, Instruments Panel, and J1939
Post Reply
scope
Posts: 18
Joined: Wed 24. Jan 2024, 15:42

Read UI element using VBS marco

Post by scope » Mon 6. May 2024, 12:22

Hello,
How can I read a value from an "Edit Value" field in my Instrument panel using a Sub in the VBS Macro File ?
Thanks!

M.Heidemann
Sales & Support
Sales & Support
Posts: 1083
Joined: Fri 20. Sep 2019, 13:31

Re: Read UI element using VBS marco

Post by M.Heidemann » Mon 6. May 2024, 12:46

Hello,

There is an example in the Instruments-Panel help:

Code: Select all

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
You'll find more info on IP-elements under reference.

Best Regards

Marvin
---
Marvin Heidemann
PEAK-Support Team

Post Reply