Test if a Component has Executed


I have some excel read/write components, and I would like to make sure that the reader has activated only after the writer is finished executing and saving the excel file. I was thinking I may be able to set up an if statement with a boolean toggle as the result but I am not sure how to go about checking if a component has finished running or not. The only output for the excel writer is an error message staing if the write was successful or not. Any help is appreciated!

Thank you!

Typically you’d set up a wire between these components, ensuring that the leftmost one always executes before the rightmost one.

If this is not an option, then it gets a lot harder. You certainly cannot make the component wait until another has finished, since components execute serially. So waiting at point A means nothing will ever happen again until you shut down Rhino through task manager.

It seems that some sort of delaying system is called for. If the read component detects the Write hasn’t finished (it can look at the Phase state of the object to see if it’s Expired or Completed), it must schedule a new solution and not do anything in the current one.

Hi David,

Thanks for the response. The problem may be more trivial than I thought, see attached screenshot:

This should ensure that the reader activates after the writer, unless I’m mistaken? Is the data dam even needed in this case?

Thanks again.