Hi All,
Below code giving some error, how i can fix this and get WTPartsusesby
Thanks,
Vivek
try{
WTPart part = null;
wt.fc.QueryResult qr=wt.part.WTPartHelper.service.getUsesWTPartMasters(part);
if(qr.hasMoreElements()){
System.out.println(part.getNumber()+"----Has----Child---"+qr.size());
wt.part.WTPartMaster partMaster = (WTPartMaster)part.getMaster();
wt.fc.QueryResult qr_parents = wt.part.WTPartHelper.service.getUsedByWTParts(partMaster);
while(qr_parents.hasMoreElements()) {
wt.part.WTPart parentPart = (wt.part.WTPart) qr_parents.nextElement();
System.out.println(partMaster.getNumber()+"----Has----Parents---"+parentPart.getName());
wt.part.WTPartMaster parentMaster = (WTPartMaster)parentPart.getMaster();
wt.fc.QueryResult qr_grandpa = wt.part.WTPartHelper.service.getUsedByWTParts(parentMaster);
}
}
}