Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
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?
Thanks.
Solved! Go to Solution.
EPMDescribeLink link = EPMDescribeLink.newEPMDescribeLink(wtPart, epmDocument);
PersistenceHelper.manager.save(link);
EPMDescribeLink link = EPMDescribeLink.newEPMDescribeLink(wtPart, epmDocument);
PersistenceHelper.manager.save(link);
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);
PersistenceHelper.
manager.store(link);Thanks for the quick Response.
Cad to part link got built after using the above methods.
Thanks.