Python Editor Configurations

In the video tutorials, I use the Atom editor to write code . You can download it from the official website link.

Go to File -> Settings -> Packages. Here we can download any package we need. In the search bar type the following names:

1. Script - It is main package that allows to work with the code.

2. autocomplete-python - autocompletes the code you type, you can speed up the work several times. It has standart python libreries, if we want to autocomplete the Revit API code, we need to install additional python stubs. Go to ironpython-stubs githube page and download it. There you can find installation instructions for various Editors, including Atom. Shortly, you need to go to autocomplete-python settings and in 'Extra Paths For Packages' line type the path to the stub.min folder:

You can delete not neccessary folders. I'm using only Autodesk imports.

Now, when you type the code, autocomplete will show you all available functions:

 You need to import all methodes that you use. Autocomplete will not work if you just import * from Revit.DB.

Next packages are optional but it makes writing code a bit comfortable:

3. minimap

4. atom-beautify

5.  python-autopep8

Post Comments(2)

...
Ruslan3 years, 2 months ago

Привіт! Я використовую PyCharm для написання коду. Базу даних Revit завантажив, але помилка завжди при написанні "doc = __revit__." - не можу отримати доступ до активного документу. Що можете порекомендувати?

...
Владимир3 years, 10 months ago

А як можливо зробити свій набір Stubs для Revit 2020? На гитхаби є приклад, але не можу зрозуміти як його використати для себе :( Пробував підключити stubs-min до Atom, роблю як в прикладі, але у мене при встановленні autocomplete-python є тільки Kite и немає Local Engine. Автозаповнення працює тільки коли Kite увімкнено і не усі модулі бачить. Щось я приплив :( Але дуже хочу почати робити свої скрипти.