Questions tagged [pyrevit]

Use this tag to ask questions about the pyRevit project. pyRevit is a library designed to setup a Rapid Application Development environment inside Autodesk Revit®. It provides a collection of useful scripts and extensions.

pyRevit blog : https://ein.sh/pyRevit/

pyRevit Issue tracker : https://github.com/eirannejad/pyRevit/issues

pyRevit project: https://github.com/eirannejad/pyRevit

104 questions
1
vote
2 answers

How to store Revit Add-in Settings with Python?

My Revit Add-in reads at some point a text file, that could be located anywhere. In my current implementation, the path to the text file is hardcoded. I'd like to avoid that, so that when I distribute the Add-in to other people, it doesn't simply…
Arnaud
  • 445
  • 4
  • 18
1
vote
1 answer

Revit API Change Groups in Python

I am trying to write a script that changes groups from one type to another. Essentially, I want to accomplish the UI equivalent of right-clicking on a group type, selecting all instances and changing the type. I am able to use something like the…
DanBoghean
  • 85
  • 3
1
vote
1 answer

How to reload keynotes using pyRevit

I am attempting to modify the extremely helpful open keynotes button script to create a 'reload keynotes' button. Currently i am trying to use the Reload Method of the KeyBasedTreeEntryTable class. kt =…
1
vote
2 answers

Use python to get filter rule information in Revit API

I have started a python script that extracts the filter rule information, but can't find a way to get the information out of the "GetRuleParameters()" Any help is greatly appreciated. I've seen a lot of information on creating rule filters, but…
TH87
  • 13
  • 3
1
vote
2 answers

How to share a variable between 2 pyRevit scripts?

I am using the latest version of pyRevit, v45. I'm writing some info in temporary files with myTempFile = script.get_instance_data_file("id") This creates a file named pyRevit_2018_xxxx_id.tmp in which I store useful info. If I'm not mistaken, the…
Arnaud
  • 445
  • 4
  • 18
1
vote
2 answers

Using french characters with pyRevit or RPS

I'd like to print dialogs in french using pyRevit scripts. As soon as I include an accent like "ê" in my code, the pyRevit script doesn't even execute. But if I do for instance print "être" in RevitPythonShell, no problem. Why? Why the different…
Arnaud
  • 445
  • 4
  • 18
1
vote
1 answer

Are some functionalities of RevitPythonWrapper out of date?

I'd like to use rpw (https://github.com/gtalarico/revitpythonwrapper) with pyRevit and RPS in Revit 2018. I have installed rpw from github beginning of this month so I can use it with RPS, and now trying to use some dialogs functionalities, like the…
Arnaud
  • 445
  • 4
  • 18
1
vote
1 answer

Revit API: Creating a new Footprint roof

I'm having trouble creating a footprint roof using revit 2018 API. Basically, I'm calling this: doc.Create.NewFootPrintRoof(ca, doc.GetElement(roofsInstances[0].LevelId), roofsInstances[0].RoofType) And: "ca" is a valid…
Arnaud
  • 445
  • 4
  • 18
1
vote
0 answers

pyRevit Profile keeps changing

First I'm not the user using this but am implementing it for a couple of users. We use VDi machines with all users profiles on the server. I have managed to clone the Git Repo and leave a copy on the server which I use Robo copy to copy to the…
ilatimerp
  • 11
  • 1
1
vote
1 answer

Revit API: 'Hidden' methods?

While using Revit API and browsing the "RevitAPI.chm" file (and browsing examples on the internet), I have noticed that some methods exist while not being listed neither in the "RevitAPI.chm" file nor suggested when using RevitPythonShell. I…
Arnaud
  • 445
  • 4
  • 18
1
vote
1 answer

Run the "Show" Feature of "Select Elements by ID" using API Revit

In the User Interface Revit has a "select element by ID" which has a "Show" button. I'm able using RPS and a custom pyrevit code to select the elements, however I'd like to give my users the ability to scan through all the views and open views…
Timon
  • 13
  • 3
1
vote
2 answers

Reading Excel files from Revit Python Shell

I am trying to read an Excel file from Revit 2017 API, using Revit Python Shell. Basically, I have no idea of what I'm doing, but I tried this: http://wiki.theprovingground.org/revit-api-py-excel , but I'm getting an error: Traceback (most recent…
Arnaud
  • 445
  • 4
  • 18
1
vote
1 answer

Revit Model Data Extraction

I want to have an excel file of all the geometries with their dimensions present in Revit model (like doors, windows with their quantities and dimensions). How can I get that? Can I use Model derivative API for that? Or any other possible way?
0
votes
0 answers

Issue with pyRevit forms

I am trying to use pyRevit to automate some tasks in Revit, but when I try to run an example code, it shows an error. Code: from pyrevit import forms ops = ['option1', 'option2', 'option3', 'option4'] forms.CommandSwitchWindow.show(ops,…
arash.amd
  • 3
  • 4
0
votes
0 answers

WPF Resource Dictionary not found with IronPython (pyRevit Revit addin development)

I am working through learning XAML, and I'm trying to learn how to use a Resource Dictionary to keep my styles consistent across different UIs. I have gotten to this point where I have defined a simple resource dictionary like…
DSquad
  • 101
  • 5