Model.messagefilefilter#

Model.messagefilefilter(type, filter)#

Sets a filter on the type of messages written when using the Model.messagefileset() function.

Parameters:
  • type (hwString) –

    The type of message to filter. This should match with the value set in Model.messagefileset(). Valid values are:

    feinput - Any messages passed to HyperMesh by an FE-input processes.

    hm - All supported type values.

  • filter (hwString) –

    A list consisting of the messages to filter to the file. Multiple values can be specified. The list should be enclosed in quotes. Valid values are:

    error - Error messages.

    information - Information messages.

    warning - Warning messages.

Example#

Save all FE - input error messages to a file named “C:/test.dat”#
import hm
import hm.entities as ent

model = hm.Model()

model.messagefileset(type="feinput", file="C:/test.dat")
model.messagefilefilter(type="feinput", filter="error")