與其他應用程式整合 > Windchill Workgroup Manager 文件集 > SolidWorks > 管理與組態 > 使用 SolidWorks 配置企業實作 > 配置屬性 > 編輯委派
  
編輯委派
Windchill 提供伺服器端委派,可用來在下載時將參數插入 SolidWorks 零件。可以使用此機制從伺服器將資訊傳送到 SolidWorks,在此可以像任何其他 SolidWorks 參數一樣使用 (例如將資訊放在工程圖表單上)。以 PTC 或 PROI 開頭的參數被視為保留的系統參數,不能以自訂來傳播。若將它們新增到自訂中,下載服務會予以忽略。
* 
下載時會將自訂參數提供給用戶端,且不會在 Windchill 作業 (例如入庫) 之後在 CAD 應用程式工作階段中更新它們。例如,如果將自訂參數的值指派為 CAD 文件編號,則在下載時會將其值提供給用戶端。如果稍後 CAD 文件重新編號,就不會自動更新 SolidWorks 工作階段或用戶端快取中的值。可以使用 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
{
// getAvailableAttributes() returns
// HashMap<String, Object> which contains
// HashMap<Attribute name, Attribute type>
HashMap getAvailableAttributes();

// getModeledAttributes(Collection docs) returns
// HashMap<input object, HashMap<Attribute name,
Attribute value>>
HashMap getModeledAttributes(Collection docs)
throws WTException;
}
請參閱範例實行,位於:
<Windchill home>/codebase/com/ptc/windchill/uwgm/proesrv/c11n/
DefaultModeledAttributesDelegate.java
2. 編輯 site.xconf 檔案 (位於 <Windchill> 中) 來新增下列屬性,以指示伺服器上自訂服務的可用性:
<Service context="default"
name="com.ptc.windchill.uwgm.proesrv.c11n.ModeledAttributesDelegate"
targetFile="codebase/service.properties">
<Option cardinality="singleton"
requestor="java.lang.Object"
serviceClass="com.ptc.windchill.uwgm.proesrv.c11n.DefaultModeled
AttributesDelegate"/>
</Service>
使用您類別的路徑來取代 serviceClass 的值 (也就是使用您類別的路徑來取代
com.ptc.windchill.uwgm.proesrv.c11n.Default
ModeledAttributesDelegate
)
3. 然後使用 xconfmanager 工具來將變更套用至 service.properties 檔案。
Runxconfmanager -p
4. 重新啟動 Windchill。