I am trying to figure out how to create a new expression that will monitor a tag based on path input without the provider. ex tagCommand("test/udt") and have it work similar if I used the expression tag("[default]" + {udtPath} + "/tag") so the process is quicker for setting up.
I was able to get the expression to read the tag once, but if the tag value updated, the vision component would not update unless the page was reloaded. I was not using a listener before, but I am trying to figure out how to go down this route. I am not understanding how to use the listener functions or if subscribing is the best route to go down.
Don't do it this way. Add a string custom property to your component that you can pass the tag path to, and use an indirect tag binding. It will look like this:
So I guess I am lost in the direction I am going, unless I am misunderstanding somethings.
The reason I am trying to do this is having to expression is for multiple tags being compared in an expression statement. The other reason is I have duplicate cells and ignition projects. So by having it look for the projects default tag provider, it would automatically update the tag for the project with minimal interaction for changeover.
Depending on project the command is issued from, tagCommand("test/udt") could result in tags:
[Cell_1]test/udt
[Cell_2]test/udt
[Cell_3]test/udt
You haven't described anything that cannot be done in the designer with ordinary bindings and tag path indirection. What made you think you needed a third-party module?
(If you still think you need a 3rd party module, first look at my Integration Toolkit for an example of module-supplied script and expression functions that leave designer tasks to the designer.)