[Do...] Posted November 13 Share Posted November 13 Hallo, ich möchte einen Dialog erstellen, der den Messaufbau anzeigt. Wie ich den Text aus dem Messaufbau auslese, habe ich bereits herausgefunden. Nun hänge ich mal wieder daran, das Bild abzurufen und im Dialog anzuzeigen. Wie kann ich mir das Bild aus dem Messaufbau in meinem Dialog anzeigen lassen? Kennt jemand dafür eine unkomplizierte Lösung? gom.app.project.measuring_setups['Messaufnahme 07-37D 378005'].instruction_image English I want to create a dialog that displays the measurement setup. I’ve already figured out how to read the text from the measurement setup. However, I’m stuck again on retrieving the image and displaying it in the dialog. How can I show the image from the measurement setup in my dialog? Does anyone know a simple solution for this? gom.app.project.measuring_setups['Messaufnahme 07-37D 378005'].instruction_image # -*- coding: utf-8 -*- import gom text=gom.app.project.measuring_setups['Messaufnahme 07-37D 378005'].instruction_text bild=gom.app.project.measuring_setups['Messaufnahme 07-37D 378005'].instruction_image RESULT=gom.script.sys.execute_user_defined_dialog (dialog={ "content": [ [ { "columns": 1, "data": "AAAAAA==", "file_name": "bild", "height": 0, "keep_aspect": True, "keep_original_size": True, "name": "bild", "rows": 1, "system_image": "system_message_warning", "tooltip": { "id": "", "text": "", "translatable": True }, "type": "image", "use_system_image": False, "width": 0 } ], [ { "columns": 1, "name": "text", "rows": 1, "text": { "id": "", "text": text, "translatable": True }, "tooltip": { "id": "", "text": "", "translatable": True }, "type": "label", "word_wrap": False } ] ], "control": { "id": "OkCancel" }, "embedding": "", "position": "", "size": { "height": 135, "width": 239 }, "sizemode": "", "style": "", "title": { "id": "", "text": "Dialogtitel", "translatable": True } }) Link to comment Share on other sites More sharing options...
[De...] Posted November 18 Share Posted November 18 you're going to want an extendable break dialog, (external file or embedded is your choice) you'll probably have to use the size parameters(image.width / image.height) to set it properly, see the docstring or https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/howtos/python_api_introduction/user_defined_dialogs.html#image-widget Link to comment Share on other sites More sharing options...
[Ju...] Posted November 18 Share Posted November 18 Hi Dominik, when working with kiosk mode, your picture + text from your measuring setup will appear automatically after selecting your template. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in