简体   繁体   中英

How to change a path image property of a Switch/Indicator element in CANalyzer's Panel from CAPL?

I'm using a Switch/Indicator Panel element in CANalyzer for visualising some system states with an image. I would like to change the path from where the Switch/Indicator gets this image by means of a CAPL program configured inside a Program Node in a Mesaurement Setup. So, are there a way to change a property like "image path" of a Switch/Indicator Panel element from CAPL?

There is a PictureBox element in the CANalyzer Panel whose file path can be loaded in measurement time with the SetPictureBoxImage() CAPL Panel function. The advantage of doing so (PictureBox instead Switch/Indicator element Panel) been that if you need to represent a very large number of states (N), the Switch/Indicator method will need a unique very large image file (maybe not manageable), whereas the PictureBox will need N little images.

"Switch/Indicator" has property "Image". To change it from CAPL in runtime:

setControlProperty("Panel name", "Switch/Indicator name", "Image", "c:\1.bmp");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM