写入导出转换器
1. 确定 Windchill 架构中的实体或属性如何映射到汽车设计 (AP214) 架构。
2. 创建一个名为 ExportWTChangeRequest2.inn 的新转换器文件,并将其置于 <Windchill>\codebase\registry\stepdex\ap214\export\includes 目录下。
3. 为在步骤 2 中创建的 inn 文件中的对象和属性添加映射。
◦ 将 Windchill 架构中的 WTChangeRequest2 实体映射到 Versioned_Action_Request 实体 AP214 架构
◦ 将与 WTChangeRequest2 实体相关联的 r_number 属性映射到其在 Versioned_Action_Request 中的 CounterPart Id 属性。
“编号”是 EXPRESS 建模语言中的保留字。因此,已将其重命名为 "r_number"
以下代码示例描述了如何映射这些属性
MAP xpxmWTChangeRequest2 FOR ver_act:aim :: versioned_action_request;
FROM (wt_chnage: wnc::e_WTChangeRequest2)
WHEN TRUE;
BEGIN_MAP
LOCAL
--Local variable
END_LOCAL;
ver_act.id :=wt_change.r_number;
END_MAP;
属性映射与 ver_act.id :=wt_change.r_number; 部分一起使用。
4. 将转换器文件注册/包括在导出特定的项目文件 (WNCTOAP214.xpxprj) 中,如以下代码所示。
SOURCE_FILES
"WNCTOAP214.xpx" --Main file
"includes/ExportWRPart.inn"
"includes/EportEMPDocument.inn"
"includes/ExportEPMMemberLink.inn"
"includes/EportEPMDescribeLink.inn"
"includes/ExportWTChangeRequest2.inn"
"includes/ExportRepresentation.inn"
"includes/ExportWRPartDescribe.inn"
"includes/ExportWTPartReferenceLink.inn"
"includes/ExportWTPartUsageLink.inn"
"includes/ExportEPMReferenceLink.inn"
"includes/ExportContentItem.inn"
"includes/AP214UnitValueProcessor.inn"
"includes/ExportOrganizationName.inn"
"includes/ExportHandlePropertyDefinition.inn"
"includes/ExportGlobalInstanceFunctions.inn"
"./../ includes/export/ExportBusinessFields.inn"
"./../ includes/StringUtils.inn"
"./../ includes/AggregateUtils.inn"
"./../ includes/DateTimeUtil.inn"
"./../ includes/MesurableUnitsUtil.inn"
END_SOURCE_FILES