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