其他 Windchill 功能 > 制造过程管理 > 自定义产品结构浏览器 (PSE) > 自定义 PSE 表格显示
  
自定义 PSE 表格显示
目标
不论特定列是必填列还是选填列,或是否为冻结列,您都希望更改 PSE 表格中列的默认显示顺序。
背景
借助 Windchill PDMLink PSE,现可供用户自定义表格中列的显示。例如,“使用”选项卡的“列详细信息”
不过,用户可执行的操作是由 PSE XML 文件 (定义每个表格中的列) 中设置的边界控制的。
范围/适用性/假设
由于这些更改是针对 PSE XML 文件所做的,因此,它们适用于所有 PSE 用户。
预期结果
默认显示是“编号”在“使用”选项卡中为冻结 (因此不会滚动) 的必填列。我们可以考虑下列情况:我们希望“名称”作为必填属性显示出来,而“名称”和“位号范围”为冻结列,“编号”不是冻结列且可选择是否显示,及“行号”可供使用但不显示。由于“编号”是可选的,因此系统会将其从表格式输入搜索中移除。
下图显示了 PSE 用户界面。
解决方法
PSE XML 文件中使用的 CellDefinition 元素包含多个属性,这些属性可以控制表中列的显示,并可指示用户对表格外观和行为进行更改的权限范围。
属性
说明
必填
如果为必填列,用户就无法隐藏该列
displayWhenNoPreferenceSet
如果不是必填列,列是否会显示
可固定
用户是否可以冻结列
已固定
默认情况下,列是否显示为冻结列
usedByTabularInput
在“草稿”和“注释”模式下,指定单元格是否可用于“数据条目”搜索。
许多 PSE 表格 (包括“使用选项卡表格”) 都是在
<Windchill>/codebase/config/logicrepository/xml/explorer/structureexplorer/Expl
orerForTablesAndPanels.xml
文件中定义的
必备知识
要实现此目标,您需要了解以下内容:
XML 文件自定义的管理
解决方案元素
元素
类型
说明
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
用于显示“使用表格 BOM”(使用显示具体值 ptc.wnc.exp.PartUsesOccTabTable 时)。
通过更改表格的 CellDefinitions 顺序,以及为必填列、displayWhenNoPreferenceSet、可固定列、已固定列和 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