Skip to main content
1-Visitor
June 6, 2017
Solved

how to get related resulting change Notice form part

  • June 6, 2017
  • 3 replies
  • 6290 views

Hi ,

How to get related resulting change notices from parts. Please provide the syntax@

Best answer by ShirishMorkhade_238755

Hi Basha Shaik

You can try below API:

  • To query Affected by Change Notices use below API:

QueryResult affected = com.ptc.windchill.enterprise.change2.commands.RelatedChangesQueryCommands.getRelatedAffectingChangeNotices((Changeable2)prt);

  • To query Related Resulting Change Notices use this API:


WTCollection resulting = com.ptc.windchill.enterprise.change2.commands.RelatedChangesQueryCommands.getRelatedResultingChangeNotices((Changeable2)prt);

I hope this helps you.

Regards,

Shirish

3 replies

12-Amethyst
June 7, 2017

RelatedChangesQueryCommands.getRelatedAffectingChangeNotices((Changeable2)wtPart);

Regards,

Kaushik

16-Pearl
June 7, 2017

Hi Basha Shaik

You can try below API:

  • To query Affected by Change Notices use below API:

QueryResult affected = com.ptc.windchill.enterprise.change2.commands.RelatedChangesQueryCommands.getRelatedAffectingChangeNotices((Changeable2)prt);

  • To query Related Resulting Change Notices use this API:


WTCollection resulting = com.ptc.windchill.enterprise.change2.commands.RelatedChangesQueryCommands.getRelatedResultingChangeNotices((Changeable2)prt);

I hope this helps you.

Regards,

Shirish

bshaik1-VisitorAuthor
1-Visitor
June 20, 2017

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

1-Visitor
June 8, 2019

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();

}

13-Aquamarine
January 24, 2022

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());