Use code below to connect Cad and Part with Owner Link (Pass 4 in parameter for creating Image build type)
ReferenceFactory factory= WTPart wtpart = (WTPart)factory.getReference( EPMDocument doc=(EPMDocument)factory.getReference( EPMBuildRuleAssociationLink link = EPMBuildRuleAssociationLink.newEPMBuildRuleAssociationLink(doc, wtpart, 0, 4);
PersistenceHelper.