From f98724dad6b34edb8e72fff77e44e32d476bfb18 Mon Sep 17 00:00:00 2001 From: guga kakhadze Date: Thu, 26 Jun 2025 15:48:03 +0400 Subject: [PATCH] when clicking on the photoeye alarm highlighting the conveyor it is based on --- MTN6_SCADA/ignition/script-python/utils/code.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/MTN6_SCADA/ignition/script-python/utils/code.py b/MTN6_SCADA/ignition/script-python/utils/code.py index 8d65268..29d8067 100644 --- a/MTN6_SCADA/ignition/script-python/utils/code.py +++ b/MTN6_SCADA/ignition/script-python/utils/code.py @@ -3,6 +3,17 @@ def handleTagHighlight(view, currentValue): if tag == "": return + + splitedTag = str(tag).split("/") + deviceName = splitedTag[-1] + + system.perspective.print(splitedTag) + + tagCopy = tag + + if "PE" in deviceName: + tag = "/".join(splitedTag[:2]) + "/Conveyor/" + deviceName[:-3] + "VFD1" + system.perspective.print(tag) components = view.rootContainer.getChildren() @@ -19,7 +30,6 @@ def handleTagHighlight(view, currentValue): if tag == tagPath: child.props.params["isHighlighted"] = True system.perspective.openDock('Docked-East-VFD', params={'tagProps': tagProps}) - break return True return False \ No newline at end of file