<aside> <img src="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/9e0a7497-c154-408d-9e32-93b87c363547/ic_01_09_Issue.png" alt="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/9e0a7497-c154-408d-9e32-93b87c363547/ic_01_09_Issue.png" width="40px" /> Requirements Basic undestanding of python programming language, and Revit API
Let's talk about pyRevit Bundles, mostly focusing on:
Bundle is basically a group of resources, placed inside a folder, with a special name.
For example, pyRevit command bundles usually include a python script file (
script.py), and an icon (
icon.png). These files are placed inside a folder with a name that ends in
.pushbutton. The last part of the naming defines the type of bundle. For example, pyRevit command bundle for Revit buttons are named similar to
MyButton.pushbutton. The last part of the name after the dot, is the type of this bundle, in this case, a Push Button.
Here is how the folder and its contents look like. The
/ at the end of the first line, means it is a directory.
MyCommand.pushbutton/ ├── icon.png └── script.py
pyRevit extensions are a type of pyRevit Bundles. Their name ends in
Extension bundles, are basically groups of other bundles (mostly command bundles). pyRevit has been designed to find these extensions when starting up Revit, and create buttons and other user interface components for the bundles inside the extension.
Now let's make our first extension
pyRevit’s extension bundles are designed to be flexible and easy to work with. Here, we will dive right into how you can create your own extension, but let’s answer one important question first:
Why would I need to create a separate extension? Why can’t I just add my scripts to the current pyRevit tools?
By creating separate extension bundles, you will have all your precious scripts and tools in a safe place and away from the changes being made to the pyRevit core tools. Your extension bundles can even live somewhere on your company shared drives and be shared between your teams as well.