Hi.
You're right, recorded macros are always messy and barely readable.
There are numerous ways to create geometry automatically in CATIA. All of them are well-described in the documentation.
You have to be more specific about what you goal is if you want different answer.