Welcome to the forums. Please post in English or French.

You are not logged in.

#1 2022-03-23 16:33:14

Registered: 2016-05-24
Posts: 49

Retrieve messages triggered by call utmess('I', ...) with Python

Hi everyone,

Is there a way to retrieve the list of messages triggered by call utmess('I' ...) (i.e. with Info level) throughout the simulation's execution by means of Python??

A more specific example:

During the Newton loop, I get the following message:

<Erreur> Le nombre maximum d'itérations de Newton est atteint

which is a message triggered by the call of utmess('I', 'MECANONLINE10_3') during the Newton loop.

This is followed by a thrown DVP_2 exception.

I would like to retrieve, in this case, the message in 'MECANONLINE10_3'.

I have tried getting Info messages by means of:

from Utilitai.Utmess import MessageLog, list_unit
info_and_alarms = MessageLog.get_info_alarm()

but this only gives me the list of ALARMS and not the info messages.

Any help is appreciated!