Previous Topic: Logging Errors in Event ProceduresNext Topic: Legal Notices


Troubleshooting Event Procedures

You can use the DebugValue procedure to assist you in troubleshooting procedures used in event processing that are not performing as you intend. The DebugValue procedure prints the value of a parameter to a log file. The error log file is specified in the event_disp_error_file parameter in the SpectroSERVER .vnmrc file.

Note: For information on how to set the event_disp_error_file parameter in the .vnmrc file, see the Event Configuration User Guide.

The DebugValue procedure accepts the following input parameters:

The DebugValue procedure returns the value that is passed in as the second input parameter (which is unchanged). As a result, you can use it as an input parameter in any other procedure without affecting the execution of that procedure.

Example

The following DebugValue procedure prints a text string, followed by the value of a read operation on an attribute of the current model. It returns the value of the read operation, which is then used as the first input parameter in the Equals procedure.

If( Equals( DebugValue( { S \"Attribute value is:\" },           \
		ReadAttribute( { C CURRENT_MODEL }, { H 1 } ),      \
		GetEventVariable( { U 1 } )                         \
		),                                                  \
	CreateEvent( { H 0x29c00003 }, { H 0xffff0000 } ),           \
	Nil()                                                        \
)