I've been trying to implement an event handler for a method I implemented within a C# scripting component. What I'm looking for is to check whether a solution has finished, I believe the SolutionEnd event is the proper event to use.
How could I implement such an event system? Are there any simple examples of event handling implementations within the scripting component? (or the SDK, I suppose that the same general rules hold for both).
if you want to check whether or not a solution has finished at a random time, you can query the SolutionState property on the Document.
If it's PreProcess, then a solution is not running, but the current state of the document does not reflect "the right answer". In other words, something has just happened that has expired a bunch of objects and a new solution is imminent.
If it's Process, then a solution is currently running.
If it's PostProcess, then a solution has completed and the document is in a valid state.
If you want to respond to a solution coming to an end, then you should use the SolutionEnd event.