Indirect addressing for image path

I am a complete beginner, just starting my first project.

I have 12 operator stations, and at each one I want to display images for the steps the operator must complete. I’ve worked out a couple different ways to do so, one with a case expression choosing an image path, and one with a concatenate string and custom parameters (concat(“steps/station”,{Root Container.StationNum}, “-”, {test1}, “.png”))

What I would LIKE to do and haven’t yet figured out, is if the image path I select is no good and results in no image I would like to automatically detect that somehow and either substitute a null value or set the image visibility to false. Is this possible?

Not sure if there’s a better way, but you can add this script to the propertyChange event on the image object:

if event.propertyName == 'path':
	event.source.visible = event.source.valid

PS. FYI the easiest way I’ve found to get a list of object attributes (properties, methods, etc.) is to attach the following script to the mouse click event of an object. Run the page in the designer and click the object. This will print all of the attributes to the designer console:

obj = event.source
attributes = dir(obj)

for attr in attributes:

You could also go to this page to get this info in more detail, however I couldn’t actually find the ‘valid’ property here…

1 Like