HOA template script events

Hi there,

What would be the script events associated for each state of the HOA to write the clicked value to the HOA variable? For example, Hand mouseRelease event → Write value 2 to variable Motor1/HOA…

Thanks
Erik

No scripts needed.
Just bind the Indicator Value and the Control Value on the component to the Motor1/HOA tag. The Control Value will need to be Bidirectional.

thanks @DavidWisely, it worked by binding directly the graphic HOA from the template with the Motor1/HOA, but as this is a Template, they are all pointing to Motor1 instead of Motor{1} like an Indirect Binding.

How can I bind the HOA Indirectly so they will point to the correct index?
Thanks

You should pass a tag path into your template (template parameter) and do the indirect binding inside the template with that path.

thanks @pturmel

I added the tagpath in the template customer parameters:
HOA_template_3

but still not binding correctly, what am I missing?

For your specific case, you don’t need the tag path, since you are passing a motor number instead. Do your motor tag paths have a space between “Motor” and the number?

When you do pass a tagpath to a template, it typically would be the leading part of the tagpath that would be common to all of the bindings needed within the template. You would not have any curly braces within this parameter. Only put those in the indirect bindings themselves.

it worked by doing normal indirect tag, with the motor index as parameter, as for the other bindings.

HOA_template_7

thanks