企业管理 > Windchill 数据加载 > 加载有关产品系列及选项和变型的数据 > 从 XML 加载数据 > 包括规则
  
包括规则
使用 Windchill 加载程序将 com.ptc.windchill.option.model.ChoiceMapping 对象加载到 Windchill 数据库中。
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"/>