ok John ,Understood.
I think your problem is at
When I try to save my drawing, I have the message below on the AutoCAD Text Window : "*Warning* Multiply owned object, handle "193AE""
My guess is that you have one block reference trying to associate itself with multiple block definitions. Inside the loop that creates the new definitions you need to associate each individual reference to its individual definition.
@MexicanCustard's code looks good to me, try stepping through the
foreach loop in the debugger so see what it is doing.