Using Load Files to Update Options and Choices
You can use load files to update the attributes of options and choices. You can also use this process to specify the new attributes that were not previously available such as Data Type.
Specify the following attributes for the option that you want to load.
Table 4. Attributes for csvBeginEditOption
Attribute
Description
Required or Optional?
csvname
Name of the option whose attributes are to be updated. Changing the name of an option is not supported.
Required
csvcontainerPath
Path to the container where the option resides. Changing the container path of an option is not supported.
Required
csvnumber
Number of the option whose attributes are to be updated. Changing the number of an option is not supported.
Optional
csvdescription
Option description.
Optional
csvoptionDataType
Specifies the type of choices the option has. The data type can only be changed from STRING to NUMERIC. Changing the data type to or from a BOOLEAN type is not supported.
Optional
csvrequiredOption
Specifies if the option is Required
Optional
csvQoMName
Specifies the Quantity of Measure for options with numeric values. This is applicable only when the data type is NUMERIC.
Optional
csvsingleChoiceSelection
Specifies whether the option is a single-selection option. Changing the single choice selection attribute for a boolean option is not supported.
Optional
csvOverrideDisplayUnits
Use this field to set override units for the specified measurement system in the format SI:mm;MKS:cm. This is applicable only when the data type is NUMERIC.
Optional
Specify the following attributes for choices that you want to load.
Table 5. Attributes for csvEditChoice
Attribute
Description
Required or Optional?
csvname
Name of the choice whose attributes are to be updated. Changing the name of a choice is not supported.
Required
csvnumber
Number of the choice whose attributes are to be updated. Changing the number of a choice is not supported.
Optional
csvdescription
Choice description.
Optional
csvchoiceDataValue
Specifies the value for a numeric choice.
Optional
* 
You do not need to load all choices of an option. Specify only the ones that you want edit.
Example
<csvBeginEditOption handler="com.ptc.windchill.option.load.Loader.beginEditOption">
<csvname>EOL_LENGTH</csvname>
<csvcontainerPath>/wt.inf.container.OrgContainer=Demo Organization/wt.pdmlink.PDMLinkProduct=EditOptionLoaderTest</csvcontainerPath>
<csvdescription>String 2 numeric</csvdescription>
<csvoptionDataType>NUMERIC</csvoptionDataType>
<csvQoMName>Length</csvQoMName>
<csvOverrideDisplayUnits>SI:cm;MKS:mm</csvOverrideDisplayUnits>
</csvBeginEditOption>
<csvEditChoice handler="com.ptc.windchill.option.load.Loader.editChoice">
<csvname>EOL_10M</csvname>
<csvdescription>String 2 numeric</csvdescription>
<csvchoiceDataValue>10</csvchoiceDataValue>
</csvEditChoice>
<csvEditChoice handler="com.ptc.windchill.option.load.Loader.editChoice">
<csvname>EOL_40M</csvname>
<csvdescription>String 2 numeric</csvdescription>
<csvchoiceDataValue>40</csvchoiceDataValue>
</csvEditChoice>
<csvEndEditOption handler="com.ptc.windchill.option.load.Loader.endEditOption"/>
Example of Editing a Boolean Option and Choices
<!-- Boolean Option: IsDeluxeTrim -->
<!-- Updating the description and the required attributes -->
<csvBeginEditOption handler="com.ptc.windchill.option.load.Loader.beginEditOption">
<csvname>IsDeluxeTrim</csvname>
<csvcontainerPath>/wt.inf.container.OrgContainer=Demo Organization/wt.pdmlink.PDMLinkProduct=Milkshake</csvcontainerPath>
<csvdescription>This is the Deluxe Trim Option</csvdescription>
<csvrequiredOption>true</csvrequiredOption>
<csvBeginEditOption>

<!-- Boolean Choice: True -->
<!-- Updating the description -->
<csvEditChoice handler="com.ptc.windchill.option.load.Loader.editChoice">
<csvname>IsDeluxeTrim_TRUE</csvname>
<csvdescription>The trim is deluxe.</csvdescription>
</csvEditChoice>

<!-- Boolean Choice: False -->
<!-- Updating the description -->
<csvEditChoice handler="com.ptc.windchill.option.load.Loader.editChoice">
<csvname>IsDeluxeTrim_FALSE</csvname>
<csvdescription>The trim is not deluxe.</csvdescription>
</csvEditChoice>

<csvEndEditOption handler="com.ptc.windchill.option.load.Loader.endEditOption"/>
도움이 되셨나요?