How to open an additional scene from the main scene?

Professional Windows® software to communicate with CAN and CAN FD busses and its add-ins: Plotter, CANdb Import, Instruments Panel, and J1939
Post Reply
CheolsoonKwon
Posts: 4
Joined: Wed 22. Jul 2020, 07:14

How to open an additional scene from the main scene?

Post by CheolsoonKwon » Wed 19. Jun 2024, 09:17

Hello,

I would like to know how to open an additional Scene2 when pressing a Button during the operation of the main Scene in PCAN Explorer's Instrument Panel.

It seems like using a macro would work. I tried finding the method in the Help by pressing F1, but it only explains how to add a completely new scene, not how to open an existing Scene2 that has already been created.

Thank you for your assistance.

Best regards

User avatar
PEAK-Support
Sales & Support
Sales & Support
Posts: 1646
Joined: Fri 10. Sep 2010, 19:34

Re: How to open an additional scene from the main scene?

Post by PEAK-Support » Wed 19. Jun 2024, 10:18

Please send us a E-mail to support[at]peak-system.com we will send you a sample project that shows how to switch between different scenes in a panel in VBS.
Please also add your PE6 license number to the E-mail (please do not post such infos here in public)

As a simple info up in front see this script:

Code: Select all

' Get Panel Referenze      
 Set panel = Documents("Scene_Object_Sample.ipf").ActiveWindow.Object
 
' Set the current active scene to a variable 
 Set activescene = panel.ActiveScene
 PrintToOutputWindow("Active is " + activescene)

' Is scene 1 active - if not set scene 1 active
 if activescene.Index <> 1 then
  PrintToOutputWindow("Set Scene 1 to active")
  panel.Scenes.Item(1).IsActive = true
 end if
So switching between different Scenes could be done by script (" panel.Scenes.Item(X).IsActive = true") or in the Panel Property by simply change a Signal Value:
Scene_Switch.png
Scene_Switch.png (12.22 KiB) Viewed 1237 times
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

Post Reply