Suppressing Messages During CATIA V5 Publishing
During the publishing of CATIA V5 design data using Windchill Visualization Services (WVS), warning messages sometimes display in pop-up windows. These messages can cause the CATIA V5 session to hang. An example of one of these warning messages is shown in the following figure.
To avoid this issue, you can set an environment variable that enables the WVS CAD Worker Agent to scan an XML file for titles and messages of specific pop-up message windows that you would like to suppress during CATIA V5 publishing. When you specify pop-up windows for suppression, you also designate the action to be taken based on the message type. For example, “Warning”—continue on with the publishing job, “Error”—abort the publishing job immediately.
* 
Suppression of pop-up windows during the publishing process can lead to an incomplete or an incorrect update for the dataset being published. However, in the case of an incomplete dataset, this can be a desirable work-around.
To set up the suppression of WVS pop-up windows during a CATIA V5 publishing job:
1. Stop the CAD Worker if it is running.
2. Invoke an XML editor and create a file named suppress.xml with the same content as described in Sample supress.xml File with Instructions.
3. In your suppress.xml file, at the appropriate location, log the title of the warning window causing the failure, its message text, and the desired action to take when the window displays during future publishing jobs (“Warning” to continue the job or “Error” to abort immediately).
For example, you could use the following definition:
<popup_definition title=”Hole*” message=”Geometry*” action=”Warning”>/
* 
Wildcards (*) can be used to simplify the definition as seen in the previous example.
4. Save your suppress.xml file to a location on your system.
5. Create a system environment variable using the name “PTC_WGM_CATIA_POPUP_SUPPRESS_DEF_FILE” and set its value to the path of your suppress.xml file.
6. Restart the File Sync CAD Worker Administration application and re-submit the publishing job to test the suppression of the pop-up window that you logged.
* 
In cases where the value of the environment variable PTC_WGM_CATIA_POPUP_SUPPRESS_DEF_FILE is being initially defined or changed, you must restart the Worker Daemon under which the worker is running. Or in the case where the worker is running as a service, restart the service from the Services console.
The publishing job either succeeds, or another failure occurs as seen in the log panel of the WVS Job Monitor window (later versions of the CAD Worker).
* 
In earlier versions of the CAD Worker, you can also check the cadapp debug log at: <theorem worker setup dir>Theorem\catia5_setup\run\uwgm_logs\cadapp and search for “getPopupSuppressionDefinitionsList INFO” to confirm access of suppress.xml file, and then search the log to confirm the suppression of the pop up message.
7. In cases where there are additional failures, repeat the procedure until the job succeeds without being hung by pop-up messages.
Sample supress.xml File with Instructions
<?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>
Sample Debug Log File
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
Isto foi útil?