Reading from usb file to ImageList

Hello,
I want to make a program/visualization where I can transfer images from a USB stick to an imageList. That way, depending on the selected recipe I could then show the desired image and possibly some additional parameters. Is it even possible to fill imageList from USB?

Hi, the way how to access external resources in mappView is desribed here. B&R Online Help. Please check it if this is what can meet your requirements.

1 Like

hello, as I see it is shown here that you have to create your own widget and display images there. Is it possible to do it differently?

Not sure what you mean by own widget. There is example how to configure image from external resources to standard button in mappView. Check the configuration example taken from xml file.

Currently I have a static ImageList with predefinex images.


And based on recepie index is displaying me picture by selected recepie index.

I want to make this dynamic. So user can fill the imageList array and just select the right index in recepie to show him picture.

Well, the image list itself is not dynamic, it does not support binding. So you can manually fill the name from e.g. usb stick or user partion and just access it. If the file with defined name exist, then it is loaded,example

if you want to give user opportunity to select image from external resources, you can use e.g. image widget where you can bind string variable. But you do not have list and index. Example with same result.


42

Note: Take into consideration browser picture caching. So if source picture is replaced with new one with the same name, browser per default will not upload the picture and will use the one from cache. You have to reload browser or disable caching (not sure how :slight_smile: ).