are you testing in Rhino 5 or Rhino WIP ? When i try to run your script from within the python editor in Rhino 5, i get this error in line 2:
Message: 'LightException' object has no attribute 'components'
Trying to run your script in Rhino 6 WIP, i get this:
Some general tips before i make an example:
Error tracking: If your script runs fine from the python editor and nothing happens when running it using the idle processor, your script must be set up so it prints out what is missing. Error checking is the key to good scripting. Try your script in an empty scene and see what happens if no billboard objects are in the document…sounds silly but you always have to think about whatever case which can happen when things are just missing.
Canceling with ESC using scriptcontext.escape_test cannot not work using events or the idle processor. Your script will continue to be run as often as the event fires. You have to write your script so it can be canceled by stopping the event when certain conditions are not met. Using the idle processor means that you have almost no way to stop the processor from within the script undless you are able to remove the script from the the processor or stop the processor by scripting the _Options command using this macro:
_-Options _IdleProcessor _Enabled=No _EnterEnd
- To use the idle processor i would suggest to start with a very basic example to find out if this works at all. Save a script to your harddrive. Do not paste the whole scriptcode into the “Commands to run” field. Run the script as shown in my post above to see if the script is fired by the idle processor. An example would be such a simple script:
Saved that under C:\ or whereever you want eg. by naming it “IdleProcessorTest.py” and in the dialog of the idle processor use this macro so your script can be found when run:
! _-RunPythonScript C:\IdleProcessorTest.py"
Enable the idle processor by checking the “Enable idle Processing” toggle, and set the time to 1 second. Do you get something ? Using Rhino 6 WIP, i do not get the “HelloWorld” string printed. @dale I guess this is a bug, running a script in Rhino 5 using the idle processor works fine.