Quantcast
Channel: PTC Community: Message List - Windchill
Viewing all articles
Browse latest Browse all 8876

Re: How to get folder of checked out part?

$
0
0

Note that this happens only when  parent part is at root level of a product/library. For a subfolder, this does not happen.

 

The fix is, get original copy of wtpart and then get its folder.

 

//Code

Folder folder = FolderHelper.service.getFolder((FolderEntry) wtpart);

System.out.println("folder = " + folder + " \nFolder Name: " + folder.getName());

 

WTPart wtpartOriginalCopy = (WTPart) WorkInProgressHelper.service.originalCopyOf(wtpart);

folder = FolderHelper.service.getFolder((FolderEntry) wtpartOriginalCopy);

System.out.println("folder = " + folder + " \nFolder Name: " + folder.getName());

 

 

//Output

folder = wt.folder.SubFolder:7771<Checked Out>

Folder Name: Checked Out

folder = wt.folder.Cabinet:7818<Default>

Folder Name: Default


Viewing all articles
Browse latest Browse all 8876

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>