Next code works fine:
List<EPMDocument> documents = new ArrayList<EPMDocument>();
AssociatedCADDocs relationship = new AssociatedCADDocs();
relationship.setTypes(AssociatedCADDocs.Type.IMPLICIT);
List<Object[]> epmDocs = EPMNavigateHelper.navigate(wtPart, relationship, CollectItem.SEED_ID, CollectItem.OTHERSIDE).getRawResults();
if(epmDocs != null)
{
for(Object[] objects : epmDocs)
{
for(Object o : objects)
{
if(o instanceof EPMDocument)
{
documents.add((EPMDocument) o);
}
}
}
}
And in other direction (not checked):
WTPart wtPart = null;
CADAssociatedParts relationship = new CADAssociatedParts();
relationship.setTypes(CADAssociatedParts.Type.IMPLICIT);
List<Object[]> epmDocs = EPMNavigateHelper.navigate(epmDocument, relationship, CollectItem.SEED_ID, CollectItem.OTHERSIDE).getRawResults();
if(epmDocs != null)
{
for(Object[] objects : epmDocs)
{
for(Object o : objects)
{
if(o instanceof WTPart)
{
WTPart tempPart = (WTPart) o;
if(tempPart.isLatestIteration())
{
wtPart = tempPart;
break;
}
}
}
}
}