当前位置: 首页 > 工具软件 > revise > 使用案例 >

SOA Service Client : Revise / Delete Item Revision

西门安宁
2023-12-01

How to revise the ItemRevision object ?

ItemRevision mdlitemrevisionobj=(ItemRevision)getModelObjectsFromUIDs(new String[]{"C0WhFIXAY95QJC"},connection)[0];

ItemRevision newItemRev = null;
//com.teamcenter.services.strong.core.DataManagementService
DataManagementService dataManagementService = DataManagementService.getService( connection );


ReviseInfo[] reviseInfos = new ReviseInfo[1];
reviseInfos[0] = new ReviseInfo();
reviseInfos[0].baseItemRevision = mdlitemrevisionobj;//ItemRevision to revise
reviseInfos[0].name = revisionName;//Name of new Revision object
reviseInfos[0].description = revisionDesc;//Description of new Revision object
reviseInfos[0].newRevId = revisionId;//Revision ID of new Revision object

ReviseResponse2 resp = dataManagementService.revise2( reviseInfos );


//Process Response to get Revised object

Set<String> mapKeySet = resp.reviseOutputMap.keySet();
for (String key : mapKeySet)
{
 ReviseOutput revOutput = (ReviseOutput) resp.reviseOutputMap.get( key );
 newItemRev = revOutput.newItemRev;// Get the
 break;
}

How to Delete the object from Teamcenter?

ModelObject[] modelObjectArr ->arry of input objects to be deleted

com.teamcenter.services.strong.core.DataManagementService dmService = com.teamcenter.services.strong.core.DataManagementService.getService(connection);
ServiceData data = dmService.deleteObjects(modelObjectArr);

 类似资料:

相关阅读

相关文章

相关问答