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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

How to Get Project documents and share new documents programmatically

WV_10110649
5-Regular Member

How to Get Project documents and share new documents programmatically

Hello everyone,

This is Windchill API-related.

 

I am trying to get a Project2 object and try to get all its documents/parts that are shared.

And also try to share/unshare their associated documents. 

 

Doing all of these programmatically through Java code but I can not find the method to do all of these.

 

Any help or suggestions? Thank you!

 

This is my code:

 

String oid = "project oid";
try {
//Get document (WTDocument)
ReferenceFactory referencefactory = new ReferenceFactory();
WTReference wtreference = (WTReference) referencefactory.getReference(oid);

if (wtreference != null) {
// If wtreference exists.

Project2 project = (Project2) wtreference.getObject();
WTContainerRef ref = (WTContainerRef) referencefactory.getReference(oid);

} else{
// If wtfreference not exists.
}
} catch ( WTException ex ) {
System.out.println("Exception: " + ex);
}

 

1 REPLY 1

Any luck with this? 

I was looking into this too, and found this: https://www.ptc.com/en/support/article/cs129540

It looks like there is no supported API. 

Announcements


Top Tags