Please reformat (edit) the above post, following the instructions on posting code in the forum.
(And have your editor replace tabs with 2 space characters.)
Do not use UI.messagebox
to debug code.
- It can fail silently if the evaluation of the string fails.
- It is modal and freezes SketchUp’s Ruby, and this causes weird behavior especially in event driven callbacks.
Instead, use puts()
to output info to the Ruby Console.