Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
Hi ,
How to get related resulting change notices from parts. Please provide the syntax@
Solved! Go to Solution.
Hi Basha Shaik
You can try below API:
QueryResult affected = com.ptc.windchill.enterprise.change2.commands.RelatedChangesQueryCommands.getRelatedAffectingChangeNotices((Changeable2)prt);
WTCollection resulting = com.ptc.windchill.enterprise.change2.commands.RelatedChangesQueryCommands.getRelatedResultingChangeNotices((Changeable2)prt);
I hope this helps you.
Regards,
Shirish
RelatedChangesQueryCommands.getRelatedAffectingChangeNotices((Changeable2)wtPart);
Regards,
Kaushik
Hi Basha Shaik
You can try below API:
QueryResult affected = com.ptc.windchill.enterprise.change2.commands.RelatedChangesQueryCommands.getRelatedAffectingChangeNotices((Changeable2)prt);
WTCollection resulting = com.ptc.windchill.enterprise.change2.commands.RelatedChangesQueryCommands.getRelatedResultingChangeNotices((Changeable2)prt);
I hope this helps you.
Regards,
Shirish
Hi Shirish,
To query Related Resulting Change Notices am using getRelatedResultingChangeNotices((Changeable2)prt ) method and it working for me
Thanks for your Support.
Thanks,
Shaik Basha
Hi I am trying to get ChangeNotice from WTPart and getting Empty Collection please help me.
WTCollection changeNotice1 = (WTCollection)RelatedChangesQueryCommands.getRelatedResultingChangeNotices((Changeable2)prt);
logger.debug("changeNotice1 size :"+changeNotice1.size());
while(iterator.hasNext())
{
ObjectReference objectReference = (ObjectReference) iterator.next();
WTChangeOrder2 wtCN = (WTChangeOrder2) objectReference.getObject();
}
use below QUERY u will get ans --->>
WTCollection resulting = com.ptc.windchill.enterprise.change2.commands.RelatedChangesQueryCommands.getRelatedResultingChangeNotices((Changeable2)part);
System.out.println("\t Resulting Object by Change Notice size :"+resulting.size());
Iterator iterator=resulting.iterator();
while(iterator.hasNext())
{
ObjectReference objectReference = (ObjectReference) iterator.next();
WTChangeOrder2 wtCN = (WTChangeOrder2) objectReference.getObject();
arrList.add(wtCN);
System.out.println("Resulting object By Change Notice so CN Detils as below ----->>>> ");
System.out.println("\t Change Notice Name :"+wtCN.getName()+" & Change Notice Number Is "+wtCN.getNumber());
use below QUERY u will get ans --->>
WTCollection resulting = com.ptc.windchill.enterprise.change2.commands.RelatedChangesQueryCommands.getRelatedResultingChangeNotices((Changeable2)WTPart / WTDocument);
System.out.println(" Resulting Object by Change Notice - size :"+resulting.size());
Iterator iterator=resulting.iterator();
while(iterator.hasNext())
{
ObjectReference objectReference = (ObjectReference) iterator.next();
WTChangeOrder2 wtCN = (WTChangeOrder2) objectReference.getObject();
System.out.println("Change Notice Name :"+wtCN.getName()+" & Change Notice Number Is "+wtCN.getNumber());