FWIW, there is currently no automated method to set the sdie of a note from/to which links attach. The position can be altered manually.
Note: a feature request/suggestion has already been made that the link’s stored attachment position metadata (
sourcepad
anddestpad
) be made readable/editable viaeachLink()
.