codeable_models.set_links¶
-
codeable_models.
set_links
(link_definitions, do_add_links=False, **kwargs)¶ Sets multiple links by first deleting all existing links on the objects to be used in the links and then adding the links in the
link_definitions
with the same functionality as theadd_links()
function.As links get deleted first, please use
set_links()
with care. Use ofadd_links()
(and maybe deleting only selected links) can be safer.- Parameters
link_definitions (dict) – A dict of link definitions as explained before.
do_add_links – Optional parameter, used to only add links, without prior deletion. Defaults to False.
**kwargs – The same keyword arguments as accepted by the
add_links()
function.
- Returns
List of newly created links.
- Return type
List[CLink]