I'm making an anylogic model, in which by a button, I want to load in an image from the local computer which runs the simulation or at the end even the stand alone application should be able to load in an image. Than I want to set this image to the background of my model.
I already tried a lot but nothing seems to work? the complexity lays in the fact that the image is not imported at model start up, but during run-time, so does anyone know how to fix this?
I tried everything as image.add('filename') and switch indexes but nothing seems to work.
Load the image at design time via the "Image" block but set its "visible" property to false.
At runtime in your button, simply call myImage.setVisible(true)
If your clients need to change images, you can:
myImage.setIndex(...)
method to change which is displayed