其他 Windchill 功能 > 製造流程管理 > 自訂產品結構總管 (PSE) > 自訂 PSE 結構查詢 > 解決方案 > 程序
  
程序
編輯檔案 ExplorerSearchableTypes.xml,在最後一行 </LogicRepository> 之前插入下列各行:
<!-- New Query definition for subtype myPart -->
<ExplorerElementGroup>
<LogicContext application="ptc.wnc.StructureExplorer"
dataType="com.aprilia.www.myPart"/>
<AttributeGroup id="ptc.wnc.exp.QuerySearchableAttrs" displayMode="view">
<!-- Remove the following that would otherwise be inherited from WTPart
Definition -->
<CellDefinition id="endItem">
<Placement remove="true"/>
</CellDefinition>
<CellDefinition id="genericType”>
<Placement remove="true"/>
</CellDefinition>
<CellDefinition id="referenceDesignator">
<Placement remove="true"/>
</CellDefinition>
<!-- Add the specific attributes of myPart -->
<CellDefinition id="myCost">
<AttributeDefinition attributeId="com.aprilia.www.myCost"/>
</CellDefinition>
<CellDefinition id="myDescription">
<AttributeDefinition attributeId="com.aprilia.www.myDescription"/>
</CellDefinition>
</AttributeGroup>
</ExplorerElementGroup>
重新啟動應用伺服器之後,會導致 "myPart" 顯示在「類型」下拉選單中,同時移除「最終項目」、「泛用」和「參考位置」屬性項目及新增 "myCost" 和 "myDescription",如「預期結果」部份中所示。
或者,若要透過 XML 自訂對 PSE UI 的其他層面進行變更,可將這些額外的行新增至保留所有 "myPart" 自訂的 XML 檔案。