VL - input datatype into create function

I want to input a datatype into it’s own create function to use existing instances when creating new ones. Possible?

no, that is not possible because VL does not (yet) support recursive types. You can however patch a “CloneMyType” utility operation that copies the data from the old instance to a new one using Split/Create or so…

also note that if your data type is set to Record EVERY change to the internal data will return a copy of the original instance. so if your goal is to set only a few properties add a “SetSomeProperties” operation to your data type. the output instance will be a copy of the original instance with the new properties set and a copy of the properties that have not been modified.

if your type is set to Class you need the above mentioned clone operation.

Ok thanks.

I still don’t quite understand record mode. What would I search for to find some reading material online?

W

Immutable data type/class

Arrrrrhh

For reference - Tonfilm’s first suggestion worked. Make a new datatype with pads for the values you want to use in the original create method, and create / split functions for this datatype. Get the data from your original type (ie split), feed into new type’s create, then you can split and use to feed / affect the original create.

Allows you to make recursive things like trees!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.