Help Creating First Extension

I’m trying to follow along on the tutorial to create my first extension but I think I’ve done something wrong with my python script. To create it I just did right click > new text document in the .extension folder. Then renamed it to have the .py extension. Then I was able to open that in visual studio and paste the sample wall volume finder code. When I restarted Revit I had no new extension. In the .pushbutton folder there was a .vs folder in there I deleted in an attempt to make it work. Now when I try to open the script.py file windows doesn’t know what software to use. Obviously I’m new to programming and python. What is the right way to create a .py file? How do I open this one now? I have Visual Studio 2019 now. Thank you in advance for your help.

I figured it out! I had pyRevit looking for the .extension folder itself instead of its parent folder called my extensions.

You can use https://code.visualstudio.com/ to develop on it with script.py

1 Like