UDT and Templates- follow up.pdf (394.1 KB)
Thanks for the valuable insight and taking the time to look at my project. I just wanted to clarify a few points. Please see attachment
UDT and Templates- follow up.pdf (394.1 KB)
Thanks for the valuable insight and taking the time to look at my project. I just wanted to clarify a few points. Please see attachment
I think most of you confusion lies in what is is actually being placed into the parameter when the embedded view is created. Hopefully the following helps:
When doing Drag and Drop (which is setup in the area noted in clarification point 3), the parameter being passed to the embedded view looks like the following screenshot and instance_number is an object when the dropConfig.udts.action value is binding:
In the new example provided, the way I configured the embedded view it only expected a String value that is a path to the tag which occurs when the dropConfig.udts.action value is path:
All of the properties being passed from these views to the faceplate rely on passing the type of object into the view you are opening which is the main thing that I modified.
As for the removal of the dropConfig, I am not sure why I removed that piece from my new example rather than just updating it to look like this.:
With the action key set to path the dragging and dropping of the tag from the tag browser creates the embedded view like you are expecting.
Garth
latest_ignition_solution_2020-06-28_1827.zip (73.6 KB) UDT and Templates- follow up2.pdf (227.0 KB)
I modified Shape_Template3 to have the dropconfig.
I see 3 approaches to adding a template view to the main view. Please see attached screenshots and project
My project will not have the shape templates in a column or row, rather they will be scattered.
What is the best solution for me
UDTDropExamples.zip (97.6 KB) tags.json (3.5 KB)
There are only 2 distinct ways to bind Views to UDTs.
All 3 of the options you have listed are basically doing the same thing which is binding the Viewâs components to a Tag Path indirectly. Your template wasnât configured properly which is why the drag & drop didnât work. Please see the attached export with changes and additional information.
In the attached project export, I added the second way that things can be done which is via the parameter bindings, which is what we had with Template2.
As for what to use:
The first thing you will want to do is choose if you want to use Parameter or Indirect bindings. The main difference at this point is parameter bindings are going to be Read Only for the foreseeable future.
Second thing is to determine if you can use a flex repeater or not. If a flex repeater fits your needs, then create a script to populate your instances. If it doesnât, then use drag and drop to create you embedded views.
Garth