HyperWorks Solvers

Messaging API

Messaging API

Previous topic Next topic No expanding text in this topic  

Messaging API

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

MotionSolve calls MESSAGE_SUB at every instance when it accesses the log file and you access the same ID tagged message as passed to the MotionSolve log file via MESSAGE_SUB as shown below:

std_log_file

Example of a standard MotionSolve log file

To create a custom messaging API:

1.Edit the <Messaging/> element in the MotionSolve XML input file as shown below:

edit_msg_ele

Editing the XML file to declare custom messaging.

To edit the <Messaging/> element in the MotionSolve XML input file:

1.Specify the usersub DLL and function name.
2.Pass an optional param_string to MESSAGE_SUB.
3.Write a MESSAGE_SUB user-subroutine (C or FORTRAN):

mess_sub_ex

Example of MESSAGE_SUB in C and FORTRAN

For example, the MESSAGE_SUB can be used to write a log file in XML format:

log_file_xml

Log file in XML format