Jump to content

Image from Measuring Setups in Dialog


---
 Share

Recommended Posts

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

image.png.2d00acc47ea5ffaba4129855c8d6d4f3.png

image.thumb.png.c925efa7d1a4d46c1195a93ded6996d9.png

# -*- 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

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

 Share

×
×
  • Create New...