Nice try Norbert!
Actually when you want “link” objects, the first parameter to SetLinkedObject is the Name of the Property in your Ent object. For an Entity it is “Category” not “pre”. It is a custom that all our objects that can hold a Category object have a property called Category.
The second argument when calling SetLinkedObject is the object reference that you want to link.
I’d bet we have no documentation for this handy function released yet. What’s worse it seems we won’t document that function in next official release either. That’s just because of schedule, we didn’t finished it in time. Sorry for the inconvenience
Meanwhile let’s try a text API documentation of a more robust version of SetLinkedObject :
Base::SetLinkedObject(PropertyName, LinkedObject, LinkedObjectPropertyName);
Automatically create links between objects. Links should be created every time when it’s needed for model consistency.
The Name of the Property where is stored a reference to the LinkedObject.
An object which should be directly accessible from this object.
The Name of the Property in the LinkedObject where is stored a reference to this object.
Notice that the third argument can be omited. That will cause the call of the previous version of SetLinkedObject.
Have fun with scripting