Hello All,
We have a requirement to copy Representation from CAD Document to its associated WTPart.
I want to do this through code because if I set preference Build Associated Parts to Yes it is creating Structure of the CAD Document on WTPart and this is not required.
I am trying this way and it is not working.
########################################################################
wtpart = (WTPart) factory.getReference("OR:wt.part.WTPart:414184331").getObject();
qr_new = PersistenceHelper.manager.navigate(wtpart, EPMBuildRule.BUILD_SOURCE_ROLE, EPMBuildRule.class,true);
if(qr_new.hasMoreElements())
{
epm = (EPMDocument) qr_new.nextElement();
Representation rep_pub = PublishUtils.getRepresentation(epm);
RepresentationHelper.service.storeRepresentation(rep_pub, wtpart, null, rep_pub.getDescription(), rep_pub.getRepresentationType());
PersistenceHelper.manager.refresh(wtpart);
}
########################################################################
Please let me know if any one has done copy of Representation from CAD Document to WTPart.
Thanks,
Niranjan M