Simon,
It doesn't look like the APIs used for association are officially supported for customization. Because of that, anything you try is not guaranteed to work and cannot be supported by PTC tech support. With that said, I found this incomplete code snippet that may be helpful. I've not tested it out so, again, no guarantees....
//Get WTPart instance associated with EPMDocument
WTPart part=...;
//Get EPMDocument instance associated with WTPart
EPMDocument epm=...;
EPMDocument epm=...;
AssociationType assoctype = null;
String association = null;
WTArrayList epmDocArray = new WTArrayList();
epmDocArray.add((EPMDocument) epm);
ResultGraph assocResultGraph = AutoAssociateHelper.getAssociatedResultGraph(epmDocArray, true);
Map datum = AutoAssociateHelper.getAssociatedLinkToObjectsMap(assocResultGraph, epmDocArray,false);
Iterator iterator = datum.keySet().iterator();
while (iterator.hasNext()) {
Object key = iterator.next();
Object obj = datum.get(key);
if (key instanceof BinaryLink && obj.equals(part)) {
BinaryLink bLink = (BinaryLink) key;
assoctype = AssociationType.getAssociationType(bLink);
if assoctype.equals(AssociationType.ACTIVE) {
String association = null;
WTArrayList epmDocArray = new WTArrayList();
epmDocArray.add((EPMDocument) epm);
ResultGraph assocResultGraph = AutoAssociateHelper.getAssociatedResultGraph(epmDocArray, true);
Map datum = AutoAssociateHelper.getAssociatedLinkToObjectsMap(assocResultGraph, epmDocArray,false);
Iterator iterator = datum.keySet().iterator();
while (iterator.hasNext()) {
Object key = iterator.next();
Object obj = datum.get(key);
if (key instanceof BinaryLink && obj.equals(part)) {
BinaryLink bLink = (BinaryLink) key;
assoctype = AssociationType.getAssociationType(bLink);
if assoctype.equals(AssociationType.ACTIVE) {
<DO WHAT YOU NEED TO DO>
}
}
}
Good luck!