I'm trying to clone one object and make duplicate of it using scripting in LC Designer ES2. one of these two use cases represent what I need to do:
Reference an existing empty object (or unassigned/unset object) to the value of another similar object type. For example; I have an empty "image" object (imgObj1), I need to copy or clone the value of another image object (imgObj2) to imgObj1 to make imgObj1's values and attributes exactly the same as imgObj2. Another example, an empty list sould be dynamically filled through referencing (without going through looping) with the same values of another filled list.
Create new object by cloning another object. For example, I need to create 4 new list object dynamically via scripting at run time (by clicking on a button for example) via cloning another list object.
I tried to use/understand the assigneNode, use, ref, clone(), etc... from the references, but the cases above it did not really worked out for me. The help documentation is not explanatory enough and/or do not have enough examples. Even the clone() method example shown in the help in ES2 does not provide enough example of other objects types.