其他 Windchill 功能 > 製造流程管理 > 自訂產品結構總管 (PSE) > 自訂 PSE 表格顯示
  
自訂 PSE 表格顯示
目標
您想要變更 PSE 表格中欄的預設顯示順序,不論特定欄是必填欄或選填欄,或欄是否為凍結欄。
背景
藉由 Windchill PDMLink,PSE 現可供使用者自訂表格中欄的顯示方式。例如,「使用」標籤的「欄詳細資訊」
不過,使用者可執行的動作是由 PSE XML 檔案中設定的限制 (定義每一個表格中的欄) 所控制。
範圍/適用性/假設
由於這些變更是針對 PSE XML 檔案所做的,因此它們適用於所有 PSE 使用者。
預期結果
預設顯示是「編號」在「使用」標籤中為凍結 (因此不會捲動) 的必填欄。我們可考慮下列情況:我們希望「名稱」作為必填屬性顯示出來,而「名稱」和「參考位置範圍」為凍結欄,「編號」不是凍結欄且可選擇是否顯示,及「行號」可供使用但不顯示。因為「編號」為選用,系統會將之從表格式輸入搜尋中刪除。
下圖顯示 PSE 使用者介面的顯示方式。
解決方案
PSE XML 檔案中使用的 CellDefinition 元素具備多個屬性,這些屬性可控制表格中欄的顯示狀態,並可指定使用者對表格外觀與行為進行變更的權限範圍。
屬性
描述 (Description)
必填
如果是必填欄,使用者就無法隱藏該欄
displayWhenNoPreferenceSet
若非必填欄,欄是否會顯示
可釘選
使用者是否可凍結欄
已釘選
欄是否預設顯示為凍結
usedByTabularInput
在「草稿」和「註釋」模式下,指定儲存格是否用於「資料項目」搜尋。
許多 PSE 表格 (包括「使用標籤表格」) 都是在檔案
<Windchill>/codebase/config/logicrepository/xml/explorer/structureexplorer/Expl
orerForTablesAndPanels.xml
中定義的
必備知識
欲達成此目標,您需瞭解下列事項:
XML 檔案自訂的管理
解決方案元素
元素
類型
描述 (Description)
ExplorerForTablesA ndPa nels.xml
XML 檔案
保留表格與面板的定義。
位於:
<Windchill>/codebase/config/logicreposi tory/xml/structureexplore
表格
XML 元素
定義表格與內容
CellDefinition
XML 元素
將顯示在 AttributeTable 中的具備相應行為的屬性。
程序
下列檔案中的表格 ID ptc.wnc.exp.PartUsesLinkTabTable:
<Windchill>/codebase/config/logicrepository/xml/explorer/structureexplorer/Explorer ForTablesAndPanels.xml
用於在顯示使用 ptc.wnc.exp.PartUsesOccTabTable 出現位置時,顯示「使用表 BOM」。
藉由變更表格的 CellDefinition 順序,及針對必填欄、displayWhen NoPreferenceSet、可釘選欄、已釘選欄和 usedByTabularInput 指定適當的值,即可構成所需的表格。
<Table id="ptc.wnc.exp.PartUsesLinkTabTable"
selectionMode="multi-non-contiguous" displayMode="view">
<CellDefinition id="name" pinned="true" mandatory="true"
usedByTabularInput="true" displayModeOverride="edit">
<AttributeDefinition attributeId="name">
<Import id="ptc.wnc.exp.SurfaceAttrAction"/>
</AttributeDefinition>
</CellDefinition>
<CellDefinition id="referenceDesignatorRange"
pinned="true" mandatory="false" displayModeOverride="edit">
<Label>
<Resource key="referenceDesignatorRangeLabel"/>
</Label>
<AttributeDefinition
attributeId="referenceDesignatorRange">
<Import id="ptc.wnc.exp.RefDesRangeAttrAction"/>
</AttributeDefinition>
</CellDefinition>
<CellDefinition id="number" pinned="false"
mandatory="false" displayWhenNoPreferenceSet="true"
usedByTabularInput="false" displayModeOverride="edit">
<AttributeDefinition attributeId="number">
<Import id="ptc.wnc.exp.SurfaceAttrAction"/>
</AttributeDefinition>
</CellDefinition>
<CellDefinition id="usedLineNumber" pinned="false"
mandatory="false" displayWhenNoPreferenceSet="false"
displayModeOverride="edit">
<Label>
<Resource key="lineNumberLabel"/>
</Label>
<AttributeDefinition attributeId="usedLineNumber"
rendererClass="com.ptc.windchill.explorer.structureexplorer.render
er.component.LineNumberComponent">
<Import id="ptc.wnc.exp.LineNumberAttrAction"/>
</AttributeDefinition>
</CellDefinition>
進行此變更之後,必須重新啟動應用伺服器。用戶端 UI 可能仍然無法正確顯示,這是因為使用者偏好設定是用來保留目前的表格版面配置。欲解決此問題,請使用「檔案」 > 「偏好設定」動作,然後重設欄/視窗版面配置偏好設定。重新啟動 PSE 時,會顯示「使用」標籤,如預期結果部份中所示。
自訂點
ID 為 "ptc.pdm.pse.ExplorerTreeTable" 的 PSE 結構定義位於:
<Windchill>/codebase\config\logicrepository\xml\explorer\productstructure\PDMLink
ExplorerForTablesAndPanels.xml
此外,如果已安裝 Windchill Supplier Management,則其表格定義位於:
<Windchill>/codebase\config\logicrepository\xml\explorer\productstructure\Explorer
ForTablesAndPanelsForSUMA.xml