다른 응용 프로그램과 통합 > Creo Parametric – Windchill Integration > 관리 및 구성 > Creo Parametric과의 상호 작업을 위한 Windchill 구성 > 다운로드 서비스에서 매개변수 사용자 정의
  
다운로드 서비스에서 매개변수 사용자 정의
Windchill은 다운로드 시 Creo Parametric 모델로 매개변수를 삽입하는 데 사용할 수 있는 서버측 위임을 제공합니다. 이 메커니즘은 정보를 서버에서 Creo Parametric로 전달하는 데 사용할 수 있습니다. 여기서 다른 Creo Parametric 매개변수와 같이 사용 가능합니다((예: 정보를 드로잉 양식에 추가할 때). "PTC" 또는 "PROI"로 시작하는 매개변수는 예약된 시스템 매개변수로 취급되며, 사용자 정의를 통해 전파할 수 없습니다. 이러한 매개변수를 사용자 정의로 추가한 경우 이 매개변수는 다운로드 서비스에 의해 무시됩니다.
* 
이 기능은 타사 CAD 도구와 Windchill Workgroup Manager의 모든 통합에 적용됩니다.
* 
사용자 정의된 매개변수는 다운로드 시 클라이언트에게 제공되며, PTC_WM_ITERATION 등의 시스템 매개변수와 달리 Creo Parametric 작업(예: 체크 인) 후 Windchill 세션 또는 로컬 캐시에서 업데이트되지 않습니다.
예를 들어 사용자 정의된 매개변수에 CAD 문서 번호 값을 지정할 경우 그 값은 모델 다운로드 시 클라이언트에게 제공됩니다. 나중에 CAD 문서 번호가 다시 지정되는 경우 Creo Parametric 세션 또는 클라이언트 캐시의 값은 자동으로 업데이트되지 않습니다.
Windchill 서비스 위임 메커니즘을 사용하여 사용자 정의를 할 수 있습니다. 다음 단계는 사용자 정의 프로세스에 대한 설명입니다.
1. 인터페이스 ModeledAttributesDelegate를 구현하는 Java 클래스를 작성합니다. 인터페이스 정의는 다음과 같습니다.
package com.ptc.windchill.uwgm.proesrv.c11n;
import java.util.Collection;
import java.util.HashMap;
import wt.util.WTException;
public interface ModeledAttributesDelegate
{
/*
Implement this API to return list of parameters added by
customization along with it's type (customization profile of the
server). For example "WT_CADDOC_NUMBER" custom parameter will
be of type "String.class" (the java class)
*/
// getAvailableAttributes() returns
// HashMap<String, Object> which contains
// HashMap<Attribute name, Attribute type>
HashMap getAvailableAttributes();
/*
This is the API, invoked by the download service on download, to
be implemented for the customization. Create and return a
HashMap where key is input object and value is HashMap of
parameter name - value pairs that must be propagated to Pro/E
part represented by the EPMDocument (input object). Use the
getCADName() API on the EPMDocument to identify the Pro/E part
*/
// getModeledAttributes(Collection docs) returns
// HashMap<input object, HashMap<Attribute name, Attribute
value> HashMap getModeledAttributes(Collection docs) throws
WTException;
}
2. site.xconf 파일(<Windchill>)을 편집하여 서버에서 사용자 정의 서비스의 가용성을 나타내도록 다음 등록 정보를 추가합니다.
<Service context="default"
name="com.ptc.windchill.uwgm.proesrv.c11n.ModeledAttributesDele
gate" targetFile=codebase/service.properties">
<Option cardinality="singleton"
requestor="java.lang.Object"
serviceClass="com.ptc.windchill.uwgm.proesrv.c11n.DefaultModele
dAttributesDelegate"/>
</Service>
그런 다음 xconfmanager 도구를 사용하여 service.properties 파일에 변경 사항을 적용합니다(xconfmanager -p 실행).
serviceClass의 값 대신 해당 클래스의 경로를 사용합니다(즉 com.ptc.windchill.uwgm.proesrv.c11n.DefaultModeledAttributesDelegate를 해당 클래스의 경로로 대체).
3. 메소드 서버를 다시 시작합니다.