Jump to content

PNG file as resource for image in dialog box?


---
 Share

Recommended Posts

Hello everyone...

In ZEISS Inspect 2023 you can add resource files to scripts such as a PNG file.

 

image.png.6da93dc44d60e858cd584f1f7f82a8e0.png

 

Is it possible to use this graphic file in a script based dialog to display it in the window? If so, how can this be programmed?

Many thanks in advance for any information on this!

Link to comment
Share on other sites

  • 2 weeks later...

Hi, 

You can set it to a dialog image widget as follows:

DIALOG = gom.script.sys.create_user_defined_dialog ...

DIALOG.image_widget_name.data = gom.app.resource[":logo.jpg"]

If all images are moved into a separate folder under scripts, for example an images folder, then

DIALOG.image_widget_name.data = gom.app.resource[":images/logo.jpg"]

Hope this helps!

Link to comment
Share on other sites

 Share

×
×
  • Create New...