其他 Windchill 功能 > 制造过程管理 > 自定义产品结构浏览器 (PSE) > 在创建新对象的过程中允许执行附加步骤
  
在创建新对象的过程中允许执行附加步骤
PSE 创建向导在 ExplorerForTablesAndPanels.xml 中定义。“创建新对象”向导由 id 为 ptc.wnc.exp.CreateWizardList 的 WizardList 段定义,而“插入新子项”向导由 id 为 ptc.wnc.exp.CreateChildWizardList 的 WizardList 段定义。
建议您在单独的 xml 文件中自定义这些向导,而不是编辑 ExplorerForTablesAndPanels.xml。WizardList 内当前允许的步骤是 AttributeGroup 和 AttributeTable。
要添加新的 AttributeGroup 或 AttributeTable,请在自定义文件中重新定义 WizardList,并在其中包含您的新步骤及“放置”段。例如:
<WizardList id="ptc.wnc.exp.CreateChildWizardList">
<AttributeGroup id="ptc.custom.exp.CustomCreatePartTab2A">
<Placement insertKey="after"
insertId="ptc.wnc.exp.CreateChildPartTab2"/>
<CellDefinition id="endItem">
<AttributeDefinition attributeId="endItem"/>
</CellDefinition>
</AttributeGroup>
<WizardList>
第一行复制要修改的 WizardList 的 id。第二行显示添加的新内嵌 AttributeGroup,也可在其他位置加以定义,然后在此导入,这与原始的 WizardList 定义方式类似。Placement 段指示您的新 AttributeGroup 将会显示在 CreateChildPartTab2 之后。
您也可以从不想使用的原始 WizardList 中移除 AttributeGroup 或 AttributeTable。例如,下列 xml 会移除向导 (显示所有可重用属性的 AttributeTable) 的最后一个步骤:
<WizardList id="ptc.wnc.exp.CreateChildWizardList">
<AttributeTable id="ptc.wnc.exp.CreatePartTab3">
<Placement remove="true"/>
</AttributeTable>
</WizartList>
ExplorerForTablesAndPanels.xml 包含多个关于如何创建 AttributeGroup 或 AttributeTable 的良好示例。在这些段的任一段内,定义您想要显示的每个属性的 CellDefinition 列表。
您还可以使用 Placement 段重新定义现有的 AttributeGroup 或 AttributeTable,并添加或移除 Celldefinition。例如:
<AttributeGroup id="ptc.wnc.exp.CreatePartTab2">
<CellDefinition id="partType">
<AttributeDefinition attributeId="partType"/>
<Placement insertKey="before" insertId="endItem"/>
</CellDefinition>
<CellDefinition id="genericType">
<AttributeDefinition attributeId=" genericType"/>
<Placement remove="true"/>
</CellDefinition>
</AttributeGroup>
本示例将使用为 CreatePartTab2 步骤定义的现有 AttributeGroup,然后在 endItem 之前添加 partType 属性并移除 genericType 属性。请注意,CreatePartTab2 将会导入到 CreateWizardList 和 CreateChildWizardList 中,以便您修改这两个向导。