Thanks for your reply.
I don’t fully understand your examples, but you say do you smarts in the window popup and I believe we already do that.
As an example, in our project we have UDT’s representing valves.
These UDT’s contain tags like open, closed, torqe fault, position and so forth.
Then we have a tempalte which displays a green valve if it’s open, red if closed, blink if faulted and so forth.
The template needs to know which UDT instance to represent so it has a custom property where you type in the repative path of the UDT instance.
Now when you press the template valve symbol you get a popup window. In the window you can also see the same info as in the template (open/cloesd/fault/…), but you also have commands like open, close, stop or a position input.
The popup is meant to be used on all the valve UDT instances and not hard coded to one instance, so we pass the path of the UDT instance in the template to the popup when it is opened.
The popup handles anomalies in the UDT. In some cases there is no closed signal. It’s disabled in the UDT structure. So we need to make logic that checks for that. And some UDT’s have a different tag name for the position so the window need to check which one to use, if any. Just a few examples.
The thing is we have about 5 different valve UDT types and now each has it’s own template valve symbol and popup windows.
I’d like to make a generic valve symbol which just has custom parameters like ‘Open’, ‘Closed’, ‘Position’ and so forth. You can then bind whatever logic to the custom property of the valve instance to make it display properly. In that way the graphics are detached from you tags/signals (which is pretty much my ultimate goal with this).
The problem comes when you press the generic valve template and need to open a popup window for the valve. At the moment the generic template has a custom parameter where you type in the relative path to the popup window you want it to open on press. There are about 5 differnet popup windows it can open and each as varying custom parameters that need to be passed to them. One of them has 11 strings, a bool and an integer that needs to be passed.
I can’t seem to come up with a simple solution to pass varying parameters from a generic template.
I’d very much like to avoid making whole bunch of ekstra custom properties in the generic valve template (like 15 string names, 15 string values, 15 bool names, 15 bool values, 15 int names, 15 int values) to be able to handle the custom property requirements of the popups, but it’s where I am at the moment.
I’ve tried to make a dataset custom property, but it doenn’t seem like a good solution either.