Hi Honolulu -
Thanks a million for this script. This is exactly what I needed. It's nice that this isn't recursive, which fits the workflow nicely for what I'm using this for.
I've edited the script slightly, to make it operate on just the selected components. (Chris, you'll be very proud...)
Same instructions for use, but select the components you wish to make unique first, then type "allsunique" into the console and hit enter.
def allsunique
model = Sketchup.active_model
selection = model.selection
selection.each do |e|
if e.is_a? Sketchup;;ComponentInstance
e.make_unique
end
end
end