Macro Convert Problem 3DMXL to 2D Drawing

Hello friends, there is a problem with this macro, what should I do?

There is a ready-made 3DXML and a part file, a technical drawing has been created in the 3D part, I am trying to write a macro that will automatically pour these part files into the technical drawing, can you help me with this?

Thank you for your supportCATIAmacro