---
title: "How to perform SaveAs on WTPart using API in Windchill PDMLink 10.0"
author: "li.feixiang"
date: "2012-04-05T18:38:17Z"
tags: []
categories: ["行业应用"]
slug: "how-to-perform-saveas-on-wtpart-using-api-in-windchill-pdmlink-10-0"
draft: false
lastmod: "2012-04-05T18:38:17Z"
id: 1474719
url: "https://felixli.iteye.com/blog/1474719"
---

标题 How to perform SaveAs on WTPart using API in Windchill PDMLink 10.0 说明 How to perform SaveAs on WTPart using API 适用于 Windchill PDMLink 10.0 原因   解决方案

- Following API can be used:

wt.enterprise.EnterpriseService.**newMultiObjectCopy**(RevisionControlled\[] originalObjects)  
wt.enterprise.EnterpriseService.**saveMultiObjectCopy**(CopyObjectInfo\[] copyInformation)

- Refer Example below:

RevisionControlled \[] originals = new RevisionControlled \[1];  
CopyObjectInfo \[] copyInfoArray = null;

originals\[0] = part;  
copyInfoArray = EnterpriseHelper.service.newMultiObjectCopy(originals);  
WTPart copy = (WTPart) copyInfoArray \[0].getCopy();  
copy.setName(part.getName() + "\_copy");  
copy.setNumber(part.getNumber() + "\_copy");  
copy.setContainer(part.getContainer());  
try {  
    copyInfoArray =  
        EnterpriseHelper.service.saveMultiObjectCopy(copyInfoArray);  
} catch (Exception e) {

}