資料管理能力 > 管理零件結構 > Windchill 選項及變體功能 > 管理選項及變體的資料 - 參考 > 載入選項及變體的資料 > 將選擇與可對應的選擇相關聯
  
將選擇與可對應的選擇相關聯
可使用 Windchill 載入程式將 com.ptc.windchill.option.model.ChoiceMappableChoiceLink 物件載入 Windchill 資料庫中。透過此關聯,選擇可以與 ChoiceMapable 物件 (例如 WTPartUageLink、NavigationFilter 等) 相關聯。透過此關聯,選擇可以用於篩選結構。此載入程式必須與 PartUsageLink 及 NavigationFilter 載入程式一起使用。
XML 格式:
. . .
<csvChoiceMappableChoiceLink handler= "com.ptc.windchill.option.load.Loader.
createChoiceMappableChoiceLink" >
<csvchoiceName>choice name</csvchoiceName>
<csvExclude>exclude choice Yes/No</csvExclude>
</csvChoiceMappableChoiceLink >
. . .
表 21. csvChoiceMappableChoiceLink 的屬性
屬性
描述
必要還是選用?
csvchoiceName
選擇名稱
必要
csvoption
為其定義選擇的選項名稱
選用
csvInstanceValue
應包括但不需要值
csvExclude
應包括但不需要值
csvcontainerPath
您要為其建立 ChoiceMappableChoiceLink 的選擇 (csvchoiceName) 之前後關聯的路徑
選用
範例:
<csvBeginOccurrencedAssemblyAdd handler="wt.part.LoadPart.beginOccurrencedAssemblyAdd">
<csvassemblyPartNumber>Car</csvassemblyPartNumber>
<csvassemblyPartVersion/>
<csvconstituentPartNumber>Red Glossy Body</csvconstituentPartNumber>
<csvconstituentPartQty>1</csvconstituentPartQty>
<csvconstituentPartUnit>ea</csvconstituentPartUnit>
<csvlineNumber/>
<csvfindNumber/>
<csvoccurrenceLocation>0.0 0.0 0.0 0.0 0.0 0.0</csvoccurrenceLocation>
<csvreferenceDesignator>Body</csvreferenceDesignator>
<csvassemblyPartIteration/>
<csvassemblyPartView>Design</csvassemblyPartView>
<csvorganizationName/>
<csvorganizationID/>
</csvBeginOccurrencedAssemblyAdd>
<!-- ChoiceMappableChoiceLink -->
<csvChoiceMappableChoiceLink
handler="com.ptc.windchill.option.load.Loader.createChoiceMappableChoiceLink">
<csvchoiceName>Red</csvchoiceName>
<csvInstanceValue/>
<csvExclude/>
</csvChoiceMappableChoiceLink>
<!-- ChoiceMappableChoiceLink -->
<csvChoiceMappableChoiceLink
handler="com.ptc.windchill.option.load.Loader.createChoiceMappableChoiceLink">
<csvchoiceName>Glossy</csvchoiceName>
<csvInstanceValue/>
<csvExclude/>
</csvChoiceMappableChoiceLink>
<csvEndOccurrencedAssemblyAdd handler="wt.part.LoadPart.endOccurrencedAssemblyAdd"/>
導覽篩選器範例