填充首选项定义
此处有两种可能的方法。
1. 您需要为 <Windchill>\codebase\registry\ixb\mapping\IXMappingConfiguration.xml 文件中配置的每个映射填充不同的首选项定义。所有此类首选项定义都可以使用首选项导入实用程序进行合并和加载。每个可加载的首选项定义都将按如下方式填充在可导入文件中
<PreferenceDefinition>
<name>R_objectContainerPath</name>
<!-identifier of the preference definition,
unique in the system-->
<visibility>HIDDEN</visibility>
<!-should be HIDDEN to avoid it showing up in the UI -->
<categoryName>FederationMapping</categoryName>
<!- it would be always FederationMapping -->
<displayName>R_objectContainerPath</displayName>
<description>Mapping for the containerPath </description>
<fullDescription> Mapping for the containerPath
</fullDescription>
<defaultValue></defaultValue>
<!-can have no value, but schema needs this element
to be specified -->
<handler>com.ptc.windchill.enterprise.preference.handler.
MultiValueMapPreferenceHandler:</handler>
<!-always MultiValuePreferenceHandler -->
<defaultComments>Mapping Test for
objectContainerPath</defaultComments>
<clientOverride>true</clientOverride>
<!-if true, implies one can override the value -->
</PreferenceDefinition>
并将确认到架构
<!ELEMENT PreferenceDefinition ( name, ObjectID?, BACInfo?, visibility,
categoryName, displayName, description, fullDescription, defaultValue,
handler, defaultComments?, clientOverride?, clientDelegate?, clientData?)>
|
示例文件位于系统中的以下位置:。\IX_LOAD\prog_examples\Mappings\src\mappings-pref.xml
|
◦ 然后,需要将首选项定义链接到特定的首选项客户端。可通过将以下条目添加到同一加载程序文件来实现此目的。请参阅上面包括的 'renault-preference-definition.xml'。
<LinkPreferenceClientDefinition>
<name>R_objectContainerPath</name>
<!-identifier of the preference definition to be linked -->
<clientName>
536416322-1456322554305-2141932519-203-136-220-10
</clientName>
<!-name of the preference client to link to. This preference
client is implicitly created by the same utility that creates
the CollaborationSourceInfo and usually has the same name as
‘guid’ parameter provided to that utility.
This client name identifies the source system for which mappings
have been defined. One can relate the definition to multiple
client names and hence multiple source systems -->
</LinkPreferenceClientDefinition>
2. 您可以按 CSV 格式填充所有映射,如示例中所示。然后,如下所示的映射转换器实用程序生成可以导入的首选项定义文件。
|
示例文件位于系统中的以下位置:。\IX_LOAD\prog_examples\Mappings\src\mappings.csv
|
windchill wt.ixb.publicforapps.extendedmapping.tools.Metadat aMappingConverter -csvtoxml "e:\ptc\mapping-test\mappings.csv" null mappings-pref true
mappings-pref 是稍后导入的输出 XML 文件名。
并且,这是将首选项定义导入系统的命令。
windchill wt.preference.ImportPreferences -importfile=e:\ptc\mapping-test\mappings-pref.xml -overwriteValueConflicts -user=wcadmin -password=wcadmin
|
使用 '-usage' 选项查找有关此实用程序的更多信息。
windchill wt.preference.ImportPreferences -usage
|