To follow up, the embedded link in that KB article is broken. What you've downloaded is the page source code, and that's why you get the syntax error code.
The attached script in post 3. is what you want to be using.
I'm working on getting the broken link fixed for future visitors to that page.
Hi, Steve -
Thanks for your efforts. It doesn't seem to be working, however, unless there's some step where I need to select the object, or be on the right layer, or something.
Here's one of the models I've been trying to play with: http://sketchup.google.com/3dwarehouse/details?mid=5573dd76bd07b95e740c0058fed336e9