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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Publish Latest Revision for CADParts

KamleshGosalia
2-Guest

Publish Latest Revision for CADParts

Hello All,

I want to publish only latest revision of CADDocuments. Anyone has custom code for retreiving latest revision or point to some overview steps?

Regards,

Kamlesh

1 REPLY 1

There is no 'getTheLatestVersion' method. Instead, the 'allVersionsOf'
returns an ordered list with the latest version

on top of the list. We are using this to get all versions. Then add
only unique documents to an ObjectVector. Which we later

return as a QueryResult.



QueryResult allVersions =
VersionControlHelper.service.allVersionsOf(doc);

if (allVersions.size() > 0) {

EPMDocument doc2 = (EPMDocument) allVersions.nextElement();

}


Top Tags