Self referencing on components

I have a lot of valves and other similar devices to configure. Each has a number of graphical objects with tag bindings. I would like to put them in a container, give the container the name of the valve (say V1001) (or use a dynamic property for the same purpose) and have indirect tag referencing on the graphical objects automatically back to the name or dynamic property. That way, I could enter once that this valve was V1001 and all the various bindings could be done for me.

This would require it to be able to self reference, like “me.parent.xxxx” or “me.container.xxxx” or something like that. This is doable in iFIX, and other systems.

Is this possible? I could find nothing in the help or forums.

This is definitely possible - it’s called indirect binding. Look at the following page in the help file:Project Design / Windows & Components / Property Binding / Indirect Bindings

Thanks, I knew about that. The examples go all the way back to the root container, though, that is the problem. I want to access properties from the component or the component’s container.

So rather than many individual indirect references like Root Container.V1001.someproperty (at least one per graphic object!), we would have me.someproperty. Then we could change just one dynamic property (or object name) and all indirect references for the valve would be set.

I hope I am being clear in my description.

Not a problem.

To give an example: say you want a widget template that displays a value and changes its colour, depending on which one of 3 widgets you display. There are a number of ways you could do this - here’s one way:

  1. Set up the following tag structure:

    2. Create a widget by drawing a container and giving it an integer dynamic property called ‘number’.
  2. Draw a label inside the container.
  3. Animate the label to show the value by binding its Text property to an Indirect Tag with a path of Widget {1}/valueand Reference 1 set toRoot Container.Container.number5. Animate the container’s colour by binding its Background Color property to an Indirect Tag with a path of Widget {1}/colourand Reference 1 set toRoot Container.Container.numberYou can then make the widget display data from any of the 3 sets of tags by changing the container’s number property. Changing this one value changes every (in this case 2) indirect reference.

I’ve attached a window containing the aforementioned widgets. Just delete the .txt extension and import it into your project.
Widget.vwin.txt (6.7 KB)

Thanks again AlThePal. It is not exactly what I am looking for. However, in playing around with it again I find that copying and renaming a container with indirects in it updates the indirect links to the new name. So it is almost it! And more than good enough to proceed.