在 CATIA V5 发布期间隐含消息
在使用 Windchill Visualization Services (WVS) 发布 CATIA V5 设计数据时,警告消息有时会在弹出窗口中显示。这些消息可能导致 CATIA V5 会话挂起。下图为此类警告消息的示例。
要避免此问题,您可设置一个环境变量,使 WVS CAD 工作器扫描 XML 文件的特定弹出窗口标题和消息,以在 CATIA V5 发布期间将其隐含。指定要隐含的弹出窗口时,也可以指定基于不同消息类型执行何种操作。例如,“警告”- 继续发布作业,“错误”- 立即中止发布作业。
* 
在发布过程中隐含弹出窗口可能导致所发布数据集的更新不完整或不正确。但是,如果数据集不完整,这可能是一个可取的解决办法。
要设置 CATIA V5 作业发布期间 WVS 弹出窗口的隐含:
1. 如果 CAD 工作器正在运行,请将其停止。
2. 调用 XML 编辑器并创建名为 suppress.xml 且与包含指示的 supress.xml 文件示例中所述内容相同的文件。
3. suppress.xml 文件的适当位置记录导致失败的警告窗口的标题和消息文本以及在未来作业发布期间显示此窗口时所需采取的操作 (“警告”继续作业或“错误”立即中止)。
例如,您可以使用以下定义:
<popup_definition title=”Hole*” message=”Geometry*” action=”Warning”>/
* 
如前一示例所示,可使用通配符 (*) 来简化定义。
4. suppress.xml 文件保存到系统中的位置。
5. 创建名称为 "PTC_WGM_CATIA_POPUP_SUPPRESS_DEF_FILE" 的系统环境变量并将其值设置为 suppress.xml 文件的路径。
6. 重新启动文件同步 CAD 工作器管理应用程序并重新提交发布作业以测试之前所记录弹出窗口的隐含情况。
* 
如果 PTC_WGM_CATIA_POPUP_SUPPRESS_DEF_FILE 环境变量的值为初始定义或更改,则必须重新启动运行工作器的工作器 Daemon。或者,如果工作器是作为服务运行,则应从服务控制台重新启动服务。
发布作业可能成功,也可能发生如 WVS 作业监视器 (更高版本的 CAD 工作器) 窗口记录面板中所示的其他失败。
* 
在较早版本的 CAD 工作器中,您还可以检查位于 <heorem worker setup dir>Theorem\catia5_setup\run\uwgm_logs\cadapp 路径下的 cadapp 调试日志并搜索 "getPopupSuppressionDefinitionsList INFO" 来确认 suppress.xml 文件的访问权限,然后搜索日志来确认弹出消息的隐含情况。
7. 如果发生其他失败,则重复此步骤直到作业成功完成而不被弹出消息挂起。
包含指示的 supress.xml 文件示例
<?xml version="1.0" encoding="UTF-8"?>
<!--
INSTRUCTIONS:
- in worker mode, during job processing, the adapter suppresses CATIA popups defined
in the <popup_definition> tags and performs an action specified in the "action"
attribute
- action attribute can only have one of the following case-sensitive values:
"warning" - Log warning, continue job
"error" - Log error, exit CNEXT.exe, job fails without delay
- for a window to be suppressed, its title has to match the pattern specified in the
"title" attribute (case-sensitive) and its message has to match the pattern specified
in the "message" attribute (case-sensitive)
- using a wildcard (*) is supported in the "title" and "message" definitions where <*>
matches any (zero or more) characters, for example:
string "ABC abc" matched with:
pattern: "*" -> match
pattern: "ABC*" -> match
pattern: "*A*" -> match
pattern: "*bc" -> match
pattern: "a*B" -> no match
- examples
<popup_definition title="*Err*" message="*twisted*" action="Warning"/> causes suppression of all popups having "Err"
in the title and "twisted" in message body
<popup_definition title="*" message="*" action="Warning" /> causes suppression of all popups
- in cases where there are intersecting "error" and "warning" definitions and the popup
matches both of them, the "error" definition applies, regardless of the order listed
in the XML,(error definitions are processed first):
<popup_definition> title="*" message="*" action="Warning"/>
<popup_definition title="AB*" message="TEST*" action="Error"/>
Error def is used if popup matches
-->
<popups_to_handle>
<popup_definition title="*diameter was changed*" message="*need update geometry*" action="error"/>
<popup_definition title="*Admin*" message="*Reque*" action="error"/>
<popup_definition title="*" message="*twisted*" action="error"/>
<popup_definition title="*" message="*" action="error"/>
</popups_to_handle>
调试日志文件示例
2016-02-02T11:49:43.451+3:00: E: T19e0: uwgmapp: UWGM_ADAPTER: WARNING: Pop-up detected: Title: "Hole diameter was changed. But a form of the geometry has been not!" Message: "Geometry should be updated. You need update geometry. Please, update geometry. Geometry waits an update. An user should update geometry in the case when geometry is not up to date. Not updated geometry is incorrect, update it. A form of the geometry is different to its structure, please, update it."
2016-02-02T11:49:43.451+3:00: E: T19e0: uwgmapp: UWGM_ADAPTER: cv5WindowHandler::getPopupSuppressionDefinitionsList INFO: PTC_WGM_CATIA_POPUP_SUPPRESS_DEF_FILE = C:\Users\Bernard Sanders\Desktop\WORKER PROJECT\suppress.xml
2016-02-02T11:49:43.452+3:00: E: T19e0: uwgmapp: UWGM_ADAPTER: cv5WindowHandler::getPopupSuppressionDefinitionsList INFO: Added popup definition: ( *diameter was changed*; *need update geometry*; FS_Ok )
2016-02-02T11:49:43.452+3:00: E: T19e0: uwgmapp: UWGM_ADAPTER: cv5WindowHandler::getPopupSuppressionDefinitionsList INFO: Added popup definition: ( *Admin*; *Reque*; FS_Ok )
2016-02-02T11:49:43.453+3:00: D: T19e0: uwgmapp: UWGM_ADAPTER: File-Open 2016_02_02-11_49_42 I-Cubed cv5WindowHandler.cpp cv5WindowHandler::handleRunningState ENTER 1454402983453 304936 893 522
2016-02-02T11:49:43.453+3:00: E: T19e0: uwgmapp: UWGM_ADAPTER: WARNING: closing pop-up dialog "Hole diameter was changed. But a form of the geometry has been not!" with the following text: "Geometry should be updated. You need update geometry. Please, update geometry. Geometry waits an update. An user should update geometry in the case when geometry is not up to date. Not updated geometry is incorrect, update it. A form of the geometry is different to its structure, please, update it."as Pre-Defined; Handling: Warning
2016-02-02T11:49:43.453+3:00: D: T19e0: uwgmapp: UWGM_ADAPTER: File-Open 2016_02_02-11_49_42 I-Cubed cv5WindowHandler.cpp cv5WindowHandler::closeDialog ENTER 1454402983453 304936 893 522
2016-02-02T11:49:43.453+3:00: D: T19e0: uwgmapp: UWGM_ADAPTER: File-Open 2016_02_02-11_49_42 I-Cubed CV5_buildMessage ENTER 1454402983453 304936 893 522
2016-02-02T11:49:43.453+3:00: D: T19e0: uwgmapp: UWGM_ADAPTER: File-Open 2016_02_02-11_49_42 I-Cubed CV5_buildMessage EXIT 1454402983453 304936 893 522
2016-02-02T11:49:43.457+3:00: D: T19e0: uwgmapp: UWGM_ADAPTER: File-Open 2016_02_02-11_49_42 I-Cubed cv5WindowHandler.cpp cv5WindowHandler::closeDialog EXIT 1454402983457 304936 893 522
2016-02-02T11:49:43.457+3:00: D: T19e0: uwgmapp: UWGM_ADAPTER: File-Open 2016_02_02-11_49_42 I-Cubed cv5WindowHandler.cpp cv5WindowHandler::handleRunningState EXIT 1454402983457 304936 893 522
这对您有帮助吗?