**Sorry TIG to come back so late, but this time I finally have time to devote myself fully to ruby. 
I would have to put "@@" into all the variables, but that is certainly not the solution you advise me. 
Here is the basic code written by Sdmitch, which is almost perfect:
def handles
@mod = Sketchup.active_model
@ent = @mod.active_entities
@last3 ||= '1'
@next = @last3.next
@next = '1' if @next == '19'
last3_name = "#{@last3}-HANDLE"
next_name = "#{@next}-HANDLE"
if @mod.definitions[last3_name] && @mod.definitions[last3_name].instances[0]
cd = @mod.definitions[next_name]
unless cd
cmp = File.join(Sketchup.find_support_file('plugins'),"TNT_ClickCuisine2/Components/#{next_name}.skp")
cd = @mod.definitions.load cmp
end
@mod.definitions.find{|d|d.name==last3_name}.instances.each{|ci|ci.definition=cd}
@last3 = @next
else
UI.messagebox "#{last3_name} not found."
end
end
Before exploring your idea TIG:
Can your solution manage multiple SKP files or the status of the handles are different for each file?
For example :
My Project 1 has been saved with the definition in "9-HANDLE".
If I open this file the code must look for the definition "9-HANDLE", to replace it with "10-HANDLE".
My Project 2 is saved in "4-HANDLE".
If I open this file the code should look for the definition "4-HANDLE", to replace it with "5-HANDLE".
Another example:
If I go back with Sketchup, the code that is "4-HANDLE" will return to the "3-HANDLE" state.
If your idea fulfills all these conditions can you write an example?
Another idea would be to replace all the definitions that are called "Handle" in their definitions.
For example:
"1-Handle", "2-Handle" or "3-Handle" etc ...
Are replaced because they contain the name "Handle" in their definitions.
Is this easier to apply?
If so, how will you change the code?
Thank you in advance for your help.
David**