@dan rathbun said:
OK. Wait. I just re-read what you wrote in the OP.
It seems that you believed that
Sketchup.template=()
would load a template (dynamically) into the currently loaded model.
It should not. It only should set up subsequent calls to open a NEW model, to use the specified template.
Sketchup.send_action("newDocument:")
or
Sketchup.file_new()
To load a style dynamically, load a .style file into the styles collection, and set it active by name or index.
Good catch, but I didn't believe that, actually. I was calling file_new after setting the new template, but the template style background still wasn't being used when it was outside the default templates directory for some reason.