Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
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);
}
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.