其他 Windchill 功能 > 製造流程管理 > 自訂產品結構總管 (PSE) > 針對子類型自訂 PSE > 解決方案 > 程序
  
程序
在下列目錄中建立表示可變零件 (myMechanical.xml) 的新檔案:
Windchill>/codebase/config/logicrepository/xml/explorer/structureexplorer
並插入下列行,或將 ExplorerElementGroup 新增至
Windchill>/codebase/config/logicrepository/xml/explorer/structure
explorer/ExplorerForTablesAndPanels.xml
<?xml version="1.0" standalone="no" ?>
<!DOCTYPE LogicRepository SYSTEM
"/config/logicrepository/dtd/LogicRepository.dtd">
<LogicRepository>
<ExplorerElementGroup>
<LogicContext application="ptc.wnc.StructureExplorer"
dataType="com.aprilia.www.myMechanical"/>
<AttributeTable id="ptc.wnc.exp.CreatePartTab3">
<Table id="Table" displayMode="edit">
<!-- These 3 entries remove the inherited entries from WTPart -->
<CellDefinition id="ALL_SOFT_SCHEMA_ATTRIBUTES">
<Placement remove="true"/>
</CellDefinition>
<CellDefinition id="ALL_SOFT_CLASSIFICATION_ATTRIBUTES">
<Placement remove="true"/>
</CellDefinition>
<CellDefinition
id="ALL_SOFT_USAGE_LINK_SCHEMA_ATTRIBUTES">
<Placement remove="true"/>
</CellDefinition>
<!-- Add the entries for attributes on Parts and UsageLink in
the specific order -->
<CellDefinition id="myDescription">
<AttributeDefinition
attributeId="com.aprilia.www.myDescription"
imageName="wtcore/images/part.gif">
<Import id="ptc.wnc.exp.CreatePanelAttrAction"/>
</AttributeDefinition>
</CellDefinition>
<CellDefinition id="myColor">
<AttributeDefinition
attributeId="com.aprilia.www.myColor"
imageName="com/ptc/windchill/explorer/config/images/uses
Tab.gif">
<Import id="ptc.wnc.exp.CreatePanelAttrAction"/>
</AttributeDefinition>
</CellDefinition>
<CellDefinition id="myCost">
<AttributeDefinition
attributeId="com.aprilia.www.myCost"
imageName="wtcore/images/part.gif">
<Import id="ptc.wnc.exp.CreatePanelAttrAction"/>
</AttributeDefinition>
</CellDefinition>
<CellDefinition id="myWeight">
<AttributeDefinition
attributeId="com.aprilia.www.myWeight"
imageName="wtcore/images/part.gif">
<Import id="ptc.wnc.exp.CreatePanelAttrAction"/>
</AttributeDefinition>
</CellDefinition>
</Table>
<Import id="ptc.wnc.exp.NewObjectAttrTableAA"/>
</AttributeTable>
<AttributeTable
id="ptc.wnc.exp.CreatePartNoUsageLinkTab3">
<Table id="Table" displayMode="edit">
<!-- These 2 entries remove the inherited entries from WTPart -->
<CellDefinition id="ALL_SOFT_SCHEMA_ATTRIBUTES">
<Placement remove="true"/>
</CellDefinition>
<CellDefinition id="ALL_SOFT_CLASSIFICATION_ATTRIBUTES">
<Placement remove="true"/>
</CellDefinition>
<!-- Add the entries for attributes on Parts in the specific order -->
<CellDefinition id="myDescription">
<AttributeDefinition attributeId="com.aprilia.www.myDescription"
imageName="wtcore/images/part.gif">
<Import id="ptc.wnc.exp.CreatePanelAttrAction"/>
</AttributeDefinition>
</CellDefinition>
<CellDefinition id="myCost">
<AttributeDefinition
attributeId="com.aprilia.www.myCost"
imageName="wtcore/images/part.gif">
<Import id="ptc.wnc.exp.CreatePanelAttrAction"/>
</AttributeDefinition>
</CellDefinition>
<CellDefinition id="myWeight">
<AttributeDefinition
attributeId="com.aprilia.www.myWeight"
imageName="wtcore/images/part.gif">
<Import id="ptc.wnc.exp.CreatePanelAttrAction"/>
</AttributeDefinition>
</CellDefinition>
</Table>
<Import id="ptc.wnc.exp.NewObjectAttrTableAA"/>
</AttributeTable>
<AttributeTable id="ptc.wnc.exp.EditPropertiesTable">
<Table id="Table" displayMode="edit">
<!-- These 3 entries remove the inherited entries from WTPart -->
<CellDefinition id="source">
<Placement remove="true"/>
</CellDefinition>
<CellDefinition id="partType">
<Placement remove="true"/>
</CellDefinition>
<CellDefinition id="ALL_SOFT_SCHEMA_ATTRIBUTES">
<Placement remove="true"/>
</CellDefinition>
<CellDefinition id="ALL_SOFT_CLASSIFICATION_ATTRIBUTES">
<Placement remove="true"/>
</CellDefinition>
<CellDefinition>
id="ALL_SOFT_USAGE_LINK_SCHEMA_ATTRIBUTES">
<Placement remove="true"/>
</CellDefinition>
<!-- Add the entries for attributes on Parts and UsageLink in the
specific order -->
<CellDefinition id="myDescription">
<AttributeDefinition
attributeId="com.aprilia.www.myDescription"
imageName="wtcore/images/part.gif">
<Import id="ptc.wnc.exp.CreatePanelAttrAction"/>
</AttributeDefinition>
</CellDefinition>
<CellDefinition id="myColor">
<AttributeDefinition
attributeId="com.aprilia.www.myColor"
imageName="com/ptc/windchill/explorer/config/images/usesTab.gif">
<Import id="ptc.wnc.exp.CreatePanelAttrAction"/>
</AttributeDefinition>
</CellDefinition>
<CellDefinition id="myCost">
<AttributeDefinition
attributeId="com.aprilia.www.myCost"
imageName="wtcore/images/part.gif">
<Import id="ptc.wnc.exp.CreatePanelAttrAction"/>
</AttributeDefinition>
</CellDefinition>
<CellDefinition id="myWeight">
<AttributeDefinition
attributeId="com.aprilia.www.myWeight"
imageName="wtcore/images/part.gif">
<Import id="ptc.wnc.exp.CreatePanelAttrAction"/>
</AttributeDefinition>
</CellDefinition>
</Table>
<Import id="ptc.wnc.exp.EditPropertiesTableAA"/>
</AttributeTable>
</ExplorerElementGroup>
</LogicRepository>
此舉會導致在「精靈」和「資訊標籤」中請求的屬性如「預期結果」部份所示。
欲將可重新使用屬性新增至「使用標籤」,請編輯:
Windchill>/codebase/config/logicrepository/xml/explorer/structure
explorer/ExplorerForTablesAndPanels.xml
找出 ID 為 ptc.wnc.exp.PartUsesLinkTabTable 的表格項目並新增:
<CellDefinition id="myColor" displayModeOverride="edit">
<AttributeDefinition attributeId="com.aprilia.www.myColor">
<Import id="ptc.wnc.exp.AssocAttrAction"/>
</AttributeDefinition>
</CellDefinition>
* 
必須完整參照,或使用您已定義的邏輯屬數參照已針對除 WTPart 之外的某物件定義的任何 <AttributionDefinition>。
必須重新啟動應用伺服器,才能套用這些變更。