如何从 CAPL 更改 CANalyzer 面板中 Switch/Indicator 元素的路径图像 属性?

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

我在 CANalyzer 中使用 Switch/Indicator 面板元素来使用图像可视化一些系统状态。 我想通过在测量设置中的程序节点内配置的 CAPL 程序更改 Switch/Indicator 获取此图像的路径。 那么,有没有办法从 CAPL 更改 属性 之类 "image path" 的 Switch/Indicator 面板元素?

CANalyzer 面板中有一个 PictureBox 元素,其文件路径可以在测量时使用 SetPictureBoxImage() CAPL 面板加载功能。 这样做的好处(PictureBox 而不是 Switch/Indicator 元素面板)是,如果您需要表示非常多的状态 (N),Switch/Indicator 方法将需要一个独特的非常大的图像文件(也许无法管理),而 PictureBox 将需要 N 个小图像。

"Switch/Indicator" 有 属性 "Image"。 要在运行时从 CAPL 更改它:

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