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

Re: Can any one tell me how I can delete Latest Iteration of WTDocument

$
0
0

Hi Ankit,

 

You can use the following Code to delete the latest iteration,

 

wt.vc.wip.Workable iterationObj = null;

boolean isLatestIteration = false;

wt.fc.QueryResult result = wt.vc.VersionControlHelper.service.allIterationsFrom((wt.vc.Iterated)WTObject);

while (result.hasMoreElements() ){

WTObject tmpObj = (WTObject)result.nextElement();

if(WTObject instanceof WTPart){


WTPart part = (WTPart)tmpObj;

isLatestIteration = part.isLatestIteration();

if(isLatestIteration){

iterationObj(part);

break;

}

 

 

}

}

 

 

if( isLatestIteration ){


wt.vc.VersionControlHelper.service.deleteIterations((wt.vc.Iterated)iterationObj,(wt.vc.Iterated)iterationObj);





strLogger.append(" :: Object Deleted :: Yes" );

}

 

BR

MKR


Viewing all articles
Browse latest Browse all 8876

Trending Articles



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