Making a CATIA macro with vibe coding

When I first heard about vibe coding

Vibe coding means making a program by telling an AI what you want in words, without writing the code yourself. When I first heard about it, I thought one line, “make it for me”, would be enough.

Trying it was different. What the AI needs is not “do it” but “how to do it”. You have to say what to make, in what format, by what standard. Say it vaguely and you get something vague. Say it precisely and you get something precise. In the end, the quality of my words becomes the quality of the result.

First try: automated trading, and it failed

The first thing I made was an automated stock trading program. I went back and forth between Claude, GPT and Google Antigravity.

It made no profit. The program got built, but it did not make money. There is no fast way to get rich.

Trying again with a CATIA macro

So I came back to what I do every day. I had a job where I needed to pull point coordinates out of CATIA and put them into a table, something like Excel. Checking each point and copying its coordinates by hand took a lot of work, and it was easy to type a number wrong.

The first thing I said was this.

“Copy the XYZ of these 8 points to the clipboard, separated by tabs.”

That one line gave me a macro, and when I ran it, the coordinates really were on the clipboard. Pasted into Excel, they dropped neatly into the cells.

Correcting it three times

The first macro was not quite usable. I corrected it three times.

  • Six decimal places instead of three. Three places did not give me the precision I needed.
  • Inches and millimeters handled automatically. Units differ from document to document, so I had the macro sort it out on its own.
  • Measured from the coordinate system I made. This was the most important one.

The last one has a story. The coordinates the macro pulled did not match the values I checked on screen. Looking closer, Z was the same but X and Y were different. That was the clue. The macro was reading against the default coordinate system, not the one I had made. So I said again, “use my coordinate system as the reference”, and from then on the values matched exactly.

The AI did not find this on its own. I was the one who saw what was different and pointed to the cause, and once I said it precisely, the AI fixed it.

How much it saved

The same job used to take about 40 clicks or actions. With the macro it takes about 11. Even better, typos in the numbers disappeared. Nobody copies by hand anymore, so nothing gets copied wrong.

How I ask now

These days I add this from the start.

“If there is anything you don’t know, ask me. If there is anything I need to decide, ask me that too.”

With that line, the AI does not decide things on its own and build them. It asks about anything unclear first. Sometimes its questions point out things I had not thought of. If saying it precisely is hard, make the AI ask until it is precise. In the end, the way to get good at vibe coding is to make the AI ask questions.

To engineers who are hesitating

You do not need to know how to code. Nobody knows your work better than you. For simplifying complicated procedures or paperwork you repeat every day, vibe coding is a really attractive option.

Please give it a try. Start small, with one tedious thing you do every day.