EBDN - Community - Question & Answers

  Thursday, 12 February 2026
  0 Replies
  398 Visits
0
Votes
Undo
Good Evening,

I have trouble finding the right AssociationRole for adding an association between a device and a document.
My code:

device.TargetAssociations.Add(AssociationRole.LocationToSheet, Picture);

When device is ObjectKind.Device in the equipment folder and Picture A picture(.jpg) I have added manually is ObjectKind.Document into the Documentation folder.

If I add the association manually in EB then the AssociationRole has index of Role = 63. But It isn´t anyhwere in the documentation.

Is there any alternative in the official AssociationRoles that I´m missing?

Thanks MJ