A BaseLink handles a reference to a C4DAtom (C4DAtomGoal) element. This class should always be used instead of storing a pointer to the element itself. A link is typically resolved by providing the BaseDocument that hosts the linked entity.
A BaseLink is typically stored in a BaseContainer or GeData container. Several functions are available to access either the BaseLink object itself or the linked entity.
To retrieve BaseLink objects stored in a BaseContainer use:
To modify BaseLink objects stored in a BaseContainer use:
See also BaseContainer Manual.
To retrieve BaseLink objects stored in a GeData object (GeData type is DA_ALIASLINK) use:
To modify BaseLink objects stored in a GeData object (GeData type is DA_ALIASLINK) use:
See also GeData Manual.
BaseLink objects can be created with the usual functions:
BaseLink objects can be cloned or copied:
A BaseLink object stores a reference to an entity. This reference can be handled with these function:
The stored reference is typically resolved using the BaseDocument that contains the referenced entity. If the linked entity is not part of a BaseDocument the BaseLink can be forced to be resolved:
BaseLink objects can be stored in a HyperFile using:
A BaseLinkArray can be used to handle multiple BaseLink objects.
References to entities can easily be added to and removed from the array using:
References to entities and other relevant data can easily be retrieved from the array using:
The BaseLinkArray can be converted into and built from an AtomArray.