Vibe coding strategy suggestions

Hi All,

Does anybody have any good suggestions for Vibe Coding pyRevit Python scripts?

I tried just a text Prompt into Gemini and it sometimes works but always requires posting errors messages back into Gemini. Sometimes even doing that it fails.

I tried uploading a working Dynamo script and tried to get Gemini to translate that into a pyRevit Python script. That worked one time but when I tried again, this time with a script that had a Package node then it didn’t work.

I have had mixed results. Is there a better way to get more consistently right results?

Also is there a way of preparing an AI to give better answers? I think the BIM Pure people made their own custom ChatGPT for doing vibe coding for Revit.

I have 4 working custom buttons working. 2 created from dyanmoBIM scripts and two created just from a text prompt.

Lots of misconceptions here

Better results:

  • learn how to.code a bit
  • learn about the Revit api a bit too
    If you don’t know the basics, you are doomed to fail. There is no shortcut since learning the basics is the shortcut

Plus

  • paid LLM, Claude or ChatGPT or cursor if you need an ide
  • add skills with ref to existing code
  • learn how to prompt

Bim Pure did not build an LLM but more likey a set of skills for the LLM to use, right? @n_catellier

If you are too lazy for all of the above, use the pyrevit mcp

1 Like

Well last year we did a few tutorials on how to “vibe-code” a python script.

My approach has changed this year, and I prefer using pyRevit MCP + Claude Code instead: https://www.youtube.com/watch?v=STy8v26dOfw&t=1s&pp=ygUgdmliZSBjb2RlIHB5dGhvbiBzY3JpcHQgYmltIHB1cmU%3D

I am personally not a coder, but I understand the Revit API (through years of using Dynamo). I think that’s enough to create basic to medium complexity tools with AI, at least for internal use. We have a C# coder in-house whenever we want to create something more “serious” to deploy to other firms.

So my recommendation is try the MCP route :slight_smile:

I don’t necessarily think you need to learn how to literally code line by line to get started. But having software development literacy and understanding the Revit API is very helpful.

1 Like

I am a very experienced user of DynamoBIM. I have used it for many years. And even used the Python node on occasions. My day job is mainly using Revit built in tools and when they aren’t enough then I turn to Dynamo, that I spent many years learning and practising.

But sharing Dynamo scripts with colleagues has always been a pain point. Even with Dynamo Player being quite well developed.

I had a script that worked great with Dynamo player. But having it as a button on pyRevit will work much better to share with colleagues than sharing the Dynamo player script.

Google Gemini did a great job of converting my Dynamo script into a pyRevit Python script with the exact same functionality but now I can share it with colleagues as a ‘push button’ and that is much less scary than Dynamo Player.

I did not create this post because I am too lazy to learn Python. I spent years learning Dynamo and want a better way to share custom automation tools with colleagues. I thought this would be a useful post for the forum because many Dynamo users can see how they can make use of their Dynamo scripts to make pyRevit buttons with help from AI.

But it is mixed results.

I’ve found Gemini very so so. Our company has executive account for ChatGPT, which works reasonably well. But it is moody. Different personalities depending on the version they are pushing on any given day. Some days it is just plain stupid. I think Claude is more solid and often use Claude to QA/QC ChatGPT code.
Ditch the Dyanmo and you’ll move faster and have better results.
My favorite use of AI is dialog boxes. I hate writing dialog boxes. Tedious. But AI has help me speed up thee UI/UX side of things which is the part that keeps users happy.
Today’s dialog work…

Same here
Cursor or Claude have been way better at this game but you always 'eed to invest in the skills and the harness if you want 90+% good results

@aaronrumple there is a great grid manager in pyrevit :wink:

Ah… but does it work across linked files… :wink:

Then it is simpler to improve the public tool. You know… Share the love.

Pushing the company that direction. Big group. Much inertia.

1 Like