在 CATIA V5 發佈期間隱抑訊息
使用 Windchill Visualization Services (WVS) 發佈 CATIA V5 設計資料期間,警告訊息有時會顯示在快顯視窗中。這些訊息可能會導致 CATIA V5 工作階段停滯。其中一則警告訊息的範例如下圖所示。
欲避免此問題,您可以設定一個環境變數,讓 WVS CAD Worker Agent 掃描 XML 檔案的特定快顯訊息視窗標題與訊息,以在 CATIA V5 發佈期間將其隱抑。當您指定隱抑的快顯視窗時,也可以根據訊息類型指定要採取的動作。例如,「警告」- 繼續發佈工作,「錯誤」- 立即中止發佈工作。
| 發佈流程期間隱抑快顯視窗可能會導致發佈資料集的更新不完整或不正確。但是,若資料集不完整,這可能會是一個比較好的因應措施。 |
欲在 CATIA V5 發佈工作期間設定 WVS 快顯視窗的隱抑:
1. 如果 CAD Worker 正在執行,請予以停止。
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 Worker 管理」應用程式,並重新提交發佈工作,以測試您記錄之快顯視窗的隱抑。
| 若環境變數 PTC_WGM_CATIA_POPUP_SUPPRESS_DEF_FILE 的值正在初始定義或變更,您必須重新啟動執行 Worker 的 Worker Daemon。或者,若 Worker 正在作為服務執行,請從服務控制台重新啟動服務。 |
發佈工作會成功,或會發生另一個失敗,如「WVS 工作監視器」視窗 (CAD Worker 的較新版本) 的記錄面板所示。
| 在 CAD Worker 的較早版本中,您也可以檢查 <theorem worker setup dir>Theorem\catia5_setup\run\uwgm_logs\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