Single Line Diagram

Good evening, I hope everyone is well. I have an issue with well, a single line diagram. I was hoping to create a template that had all of the drawings inside of it, that I could just drop on each station page. For the station page I have a flex container that I dropped a coordinate container inside of, and then inside of this coordinate container I dropped my template. It scales perfectly for both large screens and mobile devices, so thats a win. I can't seem to figure out though how I can bind the individual components inside of the template to the tags for that station. Once I drop the template inside of the coordinate container it gets treated as one component. Would I have to draw each one line for each station inside of each station? I guess is a template not possible in this situation? My assumption was that I would have to pass parameters to the template, but I can't click on the individual devices to configure the devices using bindings or scripts. My assumption is that my approach to this situation is incorrect and that there exists a much simpler way to get the same result that I'm just overlooking. Thank you guys, this community has been amazing.

In your context, it would be helpful to know what a "Station" is exactly?

Have you got any screenshots of the SLD that we can see as examples and any examples of what you need to bind?

Certainly. SLD 1 is a screenshot of the template, SLD 2 is a screen shot of the template dropped into the coordinate container that is inside of the flex container.


What I would be trying to bind are the breakers or "green squares" to boolean values. The labels would be bound to the breakers name. I also have a few other objects that aren't present on the screen, but they are going function in kind of a "they are only visible when they are active" status. The way I had this working in my head, is the breaker would clicked on, which would launch a popup that would give the person more information and controls options. I can launch a popup if I click on a breaker, but I'm not able to pass any specific information about the breaker to the popup, because I can't configure the breakers to have that information. I was thinking I may need to create parameters to pass this from the page to container, but I'm not sure how I would pass the correct information to the correct components. I maybe making it more complicated than it needs to be.

This is a pretty common application for parameters being passed between views.
In the template (normally a coordinate container) , you would have each device as an instance of a template view of the device, and it would have one parameter that would be the devicePath.
The device template would use indirect bindings on every dynamic piece of the template and use devicePath as the ID to select the correct UDT from your tags to retrieve the data from.
In the Diagram Template, you would have multiple instances of the Device Templates as view instances, and you would create a parameter stationName on the Diagram Template, which you would indirectly bind the Device Template Parameters to.

Ideally you would have your tags set up like this:

Station 1:
     Device 1:
        booleanTag
     Device 2:
        booleanTag
     Device 3:
        booleanTag
Station 2:
     Device 1:
        booleanTag
     Device 2:
        booleanTag
     Device 3:
        booleanTag

In this example, your Device Template bindings would be set up to indirectly bind to {deviceName}/booleanTag
In the Diagram Template, your Device Template Instances would have their deviceName parameter bound to {stationName}/Device1 (Or another device number as per which device you are referencing.)
When you call up the Diagram Template as an instance of the view, you would simply pass "Station 1" into stationName and the bindings would propagate through.

The end result binding in the device view effectively becomes {stationName}/{deviceName}/booleanTag
or for station 1 device 1:
Station 1/Device 1/booleanTag

2 Likes

Awesome thank you so much. I figured this was a simpler situation than I was making it out to be. I appreciate the help.