Teamcenter Customize Error Messages

All ifail’s and  OOTB(Out-of-the-Box) Errors message are found in $TC_ROOT\lang\textserver\en_US folder .

You  can customize your Error message and you can Add it in OOTB(Out-of-the-Box) files.

Reference of all Error files is present in tc_text_locale.xml file .

Which is present at following location“$TC_ROOT\lang\textserver\en_US”

Error handling in ITK code 

Siemens Teamcenter fountain errors on central error stack.Functions regularly recoil the top error from the stack.If the call is successful, ITK_ok is arrived.

The Error Message Handler (EMH) ITK functions facilitate your to access the full error list.

Error Message Handler ITK functions are describe in the tc/emh.h header file.They give the ability to store errors.


    Teamcenter Architecture Diagram Explained


It is excellent practice to acknowledge that you have acquired and handled an error reported by an Batch ITK programming  by clearing the error collect with a call to the EMH_clear_errors function.

Example:-

EMH_store_error_s2(EMH_severity_warning, ITK_err,”EMH_severity_warning”, “ITK_ok”);

return ITK_ok;

Create a custom error message:

Step1:-Define the symbol that represents the custom user error using the defined base for user errors. This can be describe in your code file or in a devoted error header file,

Example:

Define variable in your code which represents Custom error message.

Example  #define MY_TEST_ERROR (EMH_USER_error_base + 1)

Step2:-Copy the ue_errors.xml file from the $TC_ROOT\lang\textserver\en_US directory


         Teamcenter Greenfield Implementation


Step3:-Edit the copied files to include the new custom user error, for example:
<error id=”1″>This is the error message associated with the custom error MY_TEST_ERROR and parameter is noted “%1$”.</error>.Error message parameters are formatted in the error message using the %1$ notation.

Before calling  EMH_store_error function ,We must needs to clear previous errors using EMH_clear_errors() which will generate new stack structure for errors;

Example:-

{ EMH_clear_errors(); EMH_store_error_s1(EMH_severity_warning, MY_TEST_ERROR, “output statement”); if (ifail != ITK_ok) { /* your error logic here */ } }

First parameter of EMH_store_error is severity in this API we can mention 3 severity levels,

EMH_severity_error, EMH_severity_warning, or EMH_severity_information


Top 50 Teamcenter Customization Interview Questions



Note:

$TC_ROOT: Path upto Teamcenter11 directory

TC_USER_MSG_DIR : $TC_ROOT\lang\textserver\no_translation

 

We will more post on  PLM Tutorial–>Teamcenter Customization in upcoming days.

Kindly provide your valuable comment on the below Comment section and  We will try to provide the best workaround.

Kindly subscribe to your Email-Id at (https://globalplm.com/) and drop any suggestions/queries to (globalplm2@gmail.com).

admin