I have a problem.
I want to use script fast edit tag binding in perspective.
Have function can do it?
self.getChild("root").getChild("BESS_Buttery").props.params.CMU.tagbinding.tagbinding.tagpath = [JAYI_Tag]HWA/JAYI_13-6/3_22E024/BESS/CMU001
I'm not sure what you mean...
Do you want to programmatically define a binding ?
If that's what you want to do, then you'd better use indirect tag bindings instead. That's what they're for.
If that's not what you mean, can you try reformulating or giving more details about what you want to do ?
yes, I want to programmatically define a binding.
but I don't want use indirect tag binding.
Like "system.tag.configure" can direct setting tag's parameters value.
I want to know how any way can use script replace setting tag binding's tag path.
Why, what are you trying to do ? I mean, what's the goal ?
You will not be able to programmatically add/edit a Perspective binding. This is defined in the resource on the gateway.
This has been discussed on the forum:
Perspective: Create View component property bindings via script? - Ignition - Inductive Automation Forum
If you could change it in runtime, it would mean a different view config per session.
I think you mean you can do it, but you have to edit the underlying file to do it. That's still editing it programmatically though however I won't update straight away, and you may need to refresh the page to receive it in a client (i haven't tested that) . However it's a terrible idea to actually do that. Whatever the outcome required is, it can likely be done in a standard manner
It looks like this could just use an indirect binding, as
@pascal.fragnoud said, using props.params.FixeTag and UDTTag.. Unless I'm missing something? That's all the existing direct tag binding is made up of at the moment
you can do it, but you have to edit the underlying file to do it. That's still editing it programmatically though however I won't update straight away, and you may need to refresh the page to receive it in a client (i haven't tested that) . However it's a terrible idea to actually do that. Whatever the outcome required is, it can likely be done in a standard manner
You are technically correct, the best kind of correct.
What I meant is that a view cannot define/edit bindings itself in a session, e.g. a custom prop change script editing/creating a binding on another prop.
OK, maybe I need get rid of the idea.
but I hope future have the function.
But why ? What would be the use case here ?
I do a view as my faceplate template and I use expression binding my params.
I have to lots of revisions tag now,so I haven't meny time can revisions my faceplate template again.
I don't mean to be rude, but I'm struggling to understand what you said. If English isn't your first language, are you able to use google translate to translate from your native language?
I try to express my problem.
I make a perspective view do my equipment faceplate.
and then I create a new perspective view.
I use a lot of equipment faceplate in my new perspective view.
but my indirect tag binding is setting in equipment faceplate.
So I will setting my equipment faceplate binding tag from step by step.
I want to use script do it.
If I'm understanding correctly, use indirect bindings. Pass the tag path as a parameter to your view, and use that parameter as a component of the indirect tag binding.
Thank you for accommodating me.
Thank you very much.