추가 Windchill 기능 > 제조 공정 관리 > 제품 구조 탐색기(PSE) 사용자 정의 > 하위 유형에 대해 PSE 사용자 정의
  
하위 유형에 대해 PSE 사용자 정의
목표
유형 및 속성 관리 유틸리티를 사용하여 WTRaprt의 하위 유형을 정의한 다음 WTPartUsageLink에 속성을 추가했을 수 있습니다. 일반적으로 이러한 유형과 속성은 사용자 정의 없이도 PSE에 나타나지만 PSE 탐색기에서 속성 표시를 제어할 수 있습니다.
배경 정보
유형 및 속성 관리 유틸리티를 사용하여 하위 유형이 정의된 경우 PSE에서 부품 유형 선택이 자동으로 감지됩니다. 속성을 표시할지 묻는 메시지가 나타나고 속성이 표시됩니다. 이 설정은 PSE XML 파일에서 다음 ID를 가진 속성 정의를 참조하는 엔트리로 제어됩니다.
ALL_SOFT_SCHEMA_ATTRIBUTES
ALL_SOFT_CLASSIFICATION_ATTRIBUTES
ALL_SOFT_USAGE_LINK_SCHEMA_ATTRIBUTES
이러한 엔트리는 유용하지만 표시 순서는 제어할 수 없습니다. 또한 일부 값은 서버에서 프로그래밍 방식으로 설정되어 사용자가 직접 지정할 수 없을 수 있습니다.
WTPart의 기본 정의에 myDescription이라는 재사용 가능 속성이 추가된 간단한 예를 고려해 보십시오. 유형 및 속성 관리 유틸리티에서 myCost 및 myWeight 속성을 사용하여 myMechanical 부품이 정의되었고, myColor라는 재사용 가능 속성을 포함하도록 WTPartUsageLink가 확장되었습니다.
어셈블리에 새 myMechanical 부품을 삽입하는 단계에서 다음 화면이 나타납니다.
새로 삽입 마법사는 인스턴스화 가능 유형이 포함된 드롭다운을 제공합니다. 사용자가 "myMechanical" 부품을 선택합니다.
이름 및 기타 등록 정보를 지정한 후 마법사의 마지막 단계에서 재사용 가능 속성을 추가할지 묻는 메시지가 나타납니다. 속성 열을 정렬할 수 있지만 기본 순서를 제어할 수는 없습니다.
myMechanical 부품의 정보 탭은 모든 속성을 제공하지만 특정 정렬 순서를 따르지 않습니다. 디스플레이의 위쪽 부품 속성은 해당 객체를 식별하는 고정된 속성 세트를 나타내며 이 중 일부는 관련이 없을 수 있습니다. 아래쪽의 편집 가능한 테이블 속성에는 WTPart에서 상속된 속성이 포함되며 특별한 순서 없이 나타납니다.
myColor 속성은 사용 탭에 나타나지 않지만 사용자가 다른 UsageLink 속성의 값을 볼 수 있다면 유용할 수 있습니다.
PSE XML 파일을 사용자 정의하여 사용자에게 제공될 속성을 명시적으로 정의할 수 있습니다. 이는 일반적으로 정보 탭, 부품 작성 및 삽입 마법사에 영향을 줍니다.
범위/적용 가능성/가정
이러한 변경 사항은 PSE XML 파일에 대해 수행되므로 모든 PSE 사용자에게 적용됩니다.
의도한 결과
위에 설명된 예를 고려해 보십시오.
새 부품의 속성을 지정할 때 마법사 마지막 단계의 속성은 PSE XML 파일에 정의된 순서로 나타납니다.
정보 탭의 아래쪽 테이블에 있는 속성도 정렬할 수 있습니다.
사용 링크 속성을 표시하도록 사용 BOM 테이블을 구성할 수 있습니다.
솔루션
dataType에 대해 컨텍스트 응용 프로그램 "ptc.wnc.StructureExplorer"를 사용하여 새 ExplorerElementGroup을 정의합니다. 이 요소 내에 속성 테이블의 컨텐트를 정의합니다.
이 사용자 정의를 수행할 때 여러 유형의 WTPart를 정의했을 수 있습니다. 하지만 다음 파일에 이러한 요소 정의를 추가할 수도 있습니다.
<Windchill>/codebase/config/logicrepository/xml/explorer/structureexplorer/Explorer ForTablesAndPanels.xml
이 파일은 크기가 커지고 고객 확장을 식별하기가 어렵습니다. 따라서 소프트 부품 유형별로 사용자 정의 사항을 포함할 파일을 별도로 작성하는 것이 좋습니다.
각 dataType에 대해 id가 ptc.wnc.exp.CreatPartTab3, ptc.wnc.exp.CreatePartNoUsageLinkTab3 및 ptc.wnc.exp.EditPropertiesTable인 AttributeTable을 정의합니다.
사용 탭에 속성을 추가하는 작업은 id가 ptc.wnc.exp.PartUsesLinkTable인 테이블에 대한 적절한 CellDefinition을 ExplorerForTablesAndPanels.xml에 포함하여 수행합니다.
사전 지식
이 목표를 달성하려면 다음 사항을 이해해야 합니다.
XML 파일 사용자 정의 관리
솔루션 요소
요소
유형
설명
ExplorerForTableAndPanels.xml
XML 파일
PSE 테이블 및 패널의 정의가 들어 있습니다.
위치:
<Windchill>/codebase/config/logicreposi
tory/xml/structureexplore
LogicContext
XML 요소
정의를 적용할 응용 프로그램 및 데이터 유형을 지정합니다.
AttributeTable
XML 요소
속성 테이블 및 컨텐트를 정의합니다.
CellDefinition
XML 요소
AttributeTable에 표시할 속성(적절한 동작 포함)입니다.
Placement remove="true"
XML 요소
Remove=true는 상속으로 인해 등록 정보가 나타나는 것을 중지하는 데 사용됩니다.
절차
다음 디렉토리에 소프트 부품(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>은 전체로 또는 사용자가 정의한 논리적 속성을 사용하여 참조되어야 합니다.
이러한 변경 사항을 적용하려면 메소드 서버를 다시 시작해야 합니다.
추가 사용자 정의
위 예를 확장하려는 경우 사용 탭에 "myDescription" 속성을 추가하는 방법을 고려해 보십시오. 이 문자열 속성을 편집할 때 사용자가 다수의 문자를 지정할 수 있지만 테이블 셀 공간에서는 쉽지가 않습니다. 따라서 사용자가 값을 편집할 때 여러 텍스트 줄을 입력할 수 있는 대화 상자를 팝업하는 다른 렌더러를 이 속성에 연관시킬 수 있습니다.
편집:
Windchill>/codebase/config/logicrepository/xml/explorer/structure
explorer/ExplorerForTablesAndPanels.xml
id가 ptc.wnc.exp.PartUsedLinkTabTable인 테이블 엔트리를 찾아 다음을 추가합니다.
<CellDefinition id="myDescription" displayModeOverride="edit">
<AttributeDefinition attributeId="com.aprilia.www.myDescription"
rendererClass="com.ptc.windchill.explorer.structureexplorer.renderer.component.
MultilineStringComponent">
<Import id="ptc.wnc.exp.AssocAttrAction"/>
</AttributeDefinition>
</CellDefinition>
Golf Cart를 예로 사용할 경우, 셀에서 "..." 버튼을 선택하면 다음 대화 상자가 나타납니다.
이 렌더러는 정보 탭의 속성에 적용될 수도 있습니다.
사용자 정의 지점
배경 정보 단원에는 PSE가 단일 정의에 대해 많은 속성을 표시할 수 있도록 LogicalAttributes.xml에 정의된 여러 가지 특수 속성이 있습니다. 이러한 임무에는 다음이 포함됩니다.
논리 형식
설명
ALL_SOFT_ATTRIBUTES
객체에 있는 모든 재사용 가능 속성입니다.
ALL_SOFT_CLASSIFICATION_ATTRIBUTES
객체 분류와 연관된 모든 재사용 가능 속성입니다.
ALL_SOFT_NON_SCHEMA_ATTRIBUTES
객체에 있으며 객체 유형과 연관되지 않은 모든 재사용 가능 속성입니다.
ALL_SOFT_SCHEMA_ATTRIBUTES
객체 유형과 연관된 모든 재사용 가능 속성입니다.
ALL_SOFT_NON_CLASSIFICATION_SCHEMA_ATTRIBUTES
객체 유형과 연관되고 객체 분류와는 연관되지 않은 모든 재사용 가능 속성입니다.
ALL_SOFT_NON_CLASSIFICATION_ATTRIBUTES
객체에 있으며 객체 분류와 연관되지 않은 모든 재사용 가능 속성입니다.
ALL_SOFT_USAGE_LINK_SCHEMA_ATTRIBUTES
부품 컨텍스트에서, 부품 사용 링크에 있으며 부품 사용 링크 유형과 연관된 모든 재사용 가능 속성입니다.
ALL_SOFT_SCHEMA_ATTRIBUTES_FOR_INPUT_TYPE
필터에 지정된 유형과 연관된 모든 재사용 가능 속성입니다. 실제 객체의 수퍼 유형일 수 있습니다.
개정 9 PSE에서는 정보 탭 속성 테이블의 정의 및 정보 탭의 새로 만들기 대화 상자에 다음이 사용됩니다.
ALL_SOFT_SCHEMA_ATTRIBUTES
ALL_SOFT_CLASSIFICATION_ATTRIBUTES
ALL_SOFT_USAGE_LINK_SCHEMA_ATTRIBUTES
ALL_SOFT_SCHEMA_ATTRIBUTES 대신 "ALL_SOFT_ATTRIBUTES"를 사용하거나 ALL_SOFT_NON_SCHEMA_ATTRIBUTES에 대한 엔트리를 추가하면 표시할 속성을 CAD에서 프로그래밍 방식으로 채울 수 있습니다.