Most people post here to either get help or help people that are having trouble writing their own code. It seems you're looking for someone to develop this code completely for you. You may be able to find that but, in that case, I doubt that person wants to work for free. Otherwise, I encourage you to learn the foundations of Visual Basic and post here whenever you get stuck on a portion of code. I'm sure people will be happy to help.
No-one is going to be able to teach you how to write complex code in a few short forum posts. You'll need to search the internet for either some videos or books on CATIA scripting/VBA to get started. I'm definitely not an expert but that's how I started.
Your first step is to learn some basic codes either through the macro recorder as little Cthulhu suggested or as I suggested search for Visual basic for beginners on youtube/google. Next search for the .chm (CAA V5 VB Help) file in your CATIA install location, this is an index of the commands needed in CATIA for Visual Basic.