其他 Windchill 功能 > 製造流程管理 > 一般 MPMLink 總管自訂 > 變更預設量測單位 > 將自訂屬性新增至建立精靈
  
將自訂屬性新增至建立精靈
遵循下列步驟,將其他屬性新增至建立精靈,例如「插入新作業」精靈:
1. 導覽至以下目錄:
codebase\config\logicrepository\xml\explorer\customization
2. 編輯下列檔案:
CustProcessPlanExplorerMain.xml
3. 新增下列 XML 片段:
* 
在此範例中,inspectionNeeded InspectionInterval 是要新增至「插入作業」精靈的屬性。修改程式碼以符合您要自訂的精靈,並新增您自己的自訂屬性。
<ExplorerElementGroup>
<LogicContext application="ptc.cust.ProcessPlanExplorer"
dataType="com.ptc.windchill.mpml.processplan.operation.MPMOperation"/>
<AttributeGroup id="ptc.mpm.exp.CreateTab2" scrollable="true" displayMode="edit">
<CellDefinition id="inspectionNeeded">
<Label>
<Resource key="inspectionNeededLabel"/>
</Label>
<AttributeDefinition attributeId="inspectionNeeded"/>
</CellDefinition>
<CellDefinition id="inspectionInterval">
<Label>
<Resource key="inspectionIntervalLabel"/>
</Label>
<AttributeDefinition attributeId="inspectionInterval"/>
</CellDefinition>
</AttributeGroup>
</ExplorerElementGroup>
4. 清除您的 Java 快取並重新啟動「製程計劃總管」。
在此範例中,請注意:
用於此 XML 片段的應用程式 ID 是 ptc.cust.ProcessPlanExplorer。這是用來自訂「製程計劃總管」的建議應用程式 ID。
MPMOperation 物件預設的第二個建立精靈 ptc.mpm.exp.CreateTab2 在以下位置定義:
codebase\config\logicrepository\xml\explorer\mpmexplorer\MPMExplorerForTablesAndPanels.xml。
欲將更多屬性新增至相同的建立精靈,必須使用相同的 AttributeGroup ID,即 ptc.mpm.exp.CreateTab2。
只會將新屬性的儲存格定義新增至此 XML 區段。
* 
依預設,儲存格定義需要在預設儲存格定義之後新增。欲指定不同位置,請使用「放置」標籤。
<Placement insertKey="after|before" insertId="attributeName"replace="true|false"/>
For example:
<CellDefinition id="inspectionNeeded">
<Label>
<Resource key="inspectionNeededLabel"/>
</Label>
<AttributeDefinition attributeId="inspectionNeeded"/>
<Placement insertKey="after" insertId="folder"/>
</CellDefinition>
* 
資料夾是在其之後新增 inspectionNeeded 屬性的屬性 ID。