cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

We are happy to announce the new Windchill Customization board! Learn more.

how to get related resulting change Notice form part

bshaik
3-Visitor

how to get related resulting change Notice form part

Hi ,

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

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

6 REPLIES 6
KD
4-Participant
4-Participant
(To:bshaik)

RelatedChangesQueryCommands.getRelatedAffectingChangeNotices((Changeable2)wtPart);

Regards,

Kaushik

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

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

SHARA
2-Guest
(To:bshaik)

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

}

@_1647
7-Bedrock
(To:SHARA)

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

@_1647
7-Bedrock
(To:bshaik)

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

Top Tags