Sending data to Output Window

I am trying to send data (simulation time, data, etc) to the Output window during a simulation to see exactly at what time something occurs. This YouTube video covers some of this topic (https://youtu.be/Rtt6PPsQGag?si=RWWX0WjKeDJagH-D). He discussed the output window commands around 10:00 minutes into the video. But I would like to send the exact time (simulation time) something occurs to the Output window. If I just send ‘t’ it gives me all kinds of errors. Any ideas for this noob?

Hope this example can help.

DLLlink_msg.qsch (704.0 KB)
dlllink_msg.cpp (1.9 KB)

That looks like it may work. I will give it a try this evening. Thanks.

It worked. I was able to have the dll Display on the output window the time a change occurred in the output. There is a slight delay, but I hear that is to be expected. Thanks for the help.