I have loaded the cad file first in Windchill and the associated part later.So cad part and the part do not have link.
I need to create the link for each epm document.This can be done manually using "Edit Association" for each EPM Document by opening in Windchill .
I need this to be done through java code.
Anyone can give a method how to build the link through code?
Solved! Go to Solution.
Use code below to connect Cad and Part with Owner Link (Pass 4 in parameter for creating Image build type)
ReferenceFactory factory=new ReferenceFactory();
WTPart wtpart = (WTPart)factory.getReference("<WT Part Obid>").getObject();
EPMDocument doc=(EPMDocument)factory.getReference("<cad Doc Obid>").getObject();
EPMBuildRuleAssociationLink link = EPMBuildRuleAssociationLink.newEPMBuildRuleAssociationLink(doc, wtpart, 0, 4);
Thanks for the quick Response.
Cad to part link got built after using the above methods.