資料管理能力 > 管理零件結構 > Windchill 選項及變體功能 > 管理選項及變體的資料 - 參考 > 載入選項及變體的資料 > 納入規則
  
納入規則
可使用 Windchill 載入程式在 Windchill 資料庫中載入 com.ptc.windchill.option.model.ChoiceMapping 物件。
XML 格式:
<csvbeginChoiceMapping handler= "com.ptc.windchill.option.load.Loader.beginChoiceMapping">
<csvsourceChoiceName>source choice name</csvsourceChoiceName>
<csvname>name for the include rule (optional) if not given OIR will set the name
</csvdescription>
<csvlocal>specify if local include rule</csvlocal>
<csvoptionSet>name of option set where include rule is local</csvoptionSet>
<csvmerged>true</csvmerged>
</csvbeginChoiceMapping>
<csvChoiceMappingTargetChoice handler= "com.ptc.windchill.option.load.Loader.
createChoiceMappingTargetChoice" >
<csvtargetChoiceName>target choice name</csvtargetChoiceName>
<csvcontainerPath>choice container path</csvcontainerPath>
</csvChoiceMappingTargetChoice >
. . .
. . .
<csvendChoiceMapping handler= "com.ptc.windchill.option.load.Loader.endChoiceMapping" />
csvBeginChoiceMapping 的屬性
屬性
描述
必要還是選用?
csvsourceChoiceName
選擇名稱
必要
csvnumber
規則數目
選用
csvversion
規則的版本
選用
csviteration
規則的版序
選用
csvdescription
規則描述
選用
csvlocal
指定規則是否為本機
選用
csvoptionSet
指定要為其建立本機規則的選項集
選用
csvcontainerPath
來源選擇所在前後關聯的路徑
選用
csvlifecycletemplate
生命週期範本
選用
csvlifecyclestate
生命週期狀態範本
選用
csvteamTemplate
小組範本
選用
csvmerged
指定是否合併規則
選用
csvChoiceMappingTargetChoice 的屬性
屬性
描述
必要還是選用?
csvtargetChoiceName
目標選擇名稱
必要
csvcontainerPath
目標選擇之前後關聯的路徑
選用
範例:
<csvBeginChoiceMapping
handler="com.ptc.windchill.option.load.Loader.beginChoiceMapping">
<csvsourceChoiceName>Red</csvsourceChoiceName>
<csvnumber>IR-00001</csvnumber>
<csvdescription>Red Colour Default Finish</csvdescription>
<csvcontainerPath />
<csvmerged>true</csvmerged>
</csvBeginChoiceMapping>
<csvChoiceMappingTargetChoice
handler=>"com.ptc.windchill.option.load.Loader.createChoiceMappingTargetChoice"
<csvtargetChoiceName>Glossy</csvtargetChoiceName>
<csvcontainerPath />
</csvChoiceMappingTargetChoice>
<csvEndChoiceMapping
handler= "com.ptc.windchill.option.load.Loader.endChoiceMapping"/>
<csvBeginChoiceMapping
handler="com.ptc.windchill.option.load.Loader.beginChoiceMapping">
<csvsourceChoiceName>Green</csvsourceChoiceName>
<csvnumber>IR-00002</csvnumber>
<csvdescription>Green Colour Default Finish</csvdescription>
<csvcontainerPath />
<csvmerged>true</csvmerged>
</csvBeginChoiceMapping>
<csvChoiceMappingTargetChoice
handler="com.ptc.windchill.option.load.Loader.createChoiceMappingTargetChoice">
<csvtargetChoiceName>Glossy</csvtargetChoiceName>
<csvcontainerPath />
</csvChoiceMappingTargetChoice>
<csvEndChoiceMapping
handler="com.ptc.windchill.option.load.Loader.endChoiceMapping" />
<csvBeginChoiceMapping
handler="com.ptc.windchill.option.load.Loader.beginChoiceMapping">
<csvsourceChoiceName>Blue</csvsourceChoiceName>
<csvnumber>IR-00003</csvnumber>
<csvdescription>Blue Colour Default Finish</csvdescription>
<csvcontainerPath />
<csvmerged>true</csvmerged>
</csvBeginChoiceMapping>
<csvChoiceMappingTargetChoice
handler="com.ptc.windchill.option.load.Loader.createChoiceMappingTargetChoice">
<csvtargetChoiceName>Glossy</csvtargetChoiceName>
<csvcontainerPath />
</csvChoiceMappingTargetChoice>
<csvEndChoiceMapping
handler= "com.ptc.windchill.option.load.Loader.endChoiceMapping"/>