企业管理 > Windchill 导出和导入 > 了解 Windchill 导出和导入 > 上下文注意事项 > 用上下文映射文件控制导入对象的目标
  
用上下文映射文件控制导入对象的目标
通常,所有对象都会被导入到启动导入进程的目标上下文中。如果要覆盖此行为,可使用上下文映射。出于安全性考虑,导入操作始终针对单个项目上下文执行。
上下文映射文件允许将导入对象分布到多个目标。上下文映射文件主要是为找不到别的解决方案的高级用户预备的。上下文映射文件对导入设置中的上下文路径起到硬连线的作用,因此,这种方法需要源系统和目标系统之间的确切同步,而这种同步通常只能通过生产导出方案的控制器来实现。
更好的方法是,先分析您真正的转移需要,然后简化相应导出设置的创建。PTC 建议用户不要在自己的站点过多使用上下文映射文件功能。
上下文映射文件使用以下语法:
<?xml version="1.0" encoding="UTF-8" ?>
<container-info>
<container>
<source-container>Original containerReference of the object
at the export site</source-container>

<target-container>containerReference of the context
where the object must be imported to at the import site</target-
container>
</container>
<container>
<source-container>Original containerReference of the object
at the export site</source-container>
<target-container>containerReference of the context where
the object must be imported to at the import site</target-
container>
</container>
<container>
<source-container>Original containerReference of the object
at the export site</source-container>
<target-container>containerReference of the context where
the object must be imported to at the import site</target-
container>
</container>
</container-info>
映射文件中可包含多个 <container> 元素,如下例中所示:
<?xml version="1.0" encoding="UTF-8" ?>
<container-info>
<container>
<source-
container>/wt.inf.container.DefaultOrgContainer=DefaultOrg/w
t.inf.container.ClassicContainer=Windchill PDM</source-
container>
<target-
container>/wt.inf.container.OrgContainer=Windchill_RD/wt.inf
.library.WTLibrary=Windchill PDM</target-container>
</container>
</container-info>