10-02-2023 03:41 PM - edited 10-02-2023 03:43 PM
I would like to make TypeDataStruct (Declared as modeltree structure) a part of other structure, e.g. MyStruct.TypeDataCopy.
I figured out it is not possible in Control Plus Studio. I can create any variable of this type (TypeDataStruct) but I cannot use it as nested element of other structure. Is it standard behavior or is it a bug?
10-04-2023 09:05 AM
This behavior is intentional. Otherwise it would be even more complicated for CpStudio to decide when instances of model tree structs may be deleted, renamed, moved and so on. The restriction also allows the update algorithm to assume that there is always exactly one instance of a modeltree substructure, and this is the auto-created one in the parent structure.