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
5
votes
2 answers

Accessing Revit API from outside Revit

I've used RevitPythonShell and Dynamo, but would like to use my existing Python IDE (Eclipse) where I have my configuration for logging, debugging, GitHub integration, etc. I'm comfortable with transactions and the overall API, and I've invested…
Marcus Jones
  • 960
  • 3
  • 11
  • 27
3
votes
2 answers

c# - Revit api - multi version plugin .csproj file

I'm trying to create a simple multi-version hello World plug-in for Revit and I've found this article which I'm trying to follow along. however, I'm not getting very far. I'm not so familiar with how the .csproj file works. I've created plugins…
Cflux
  • 1,423
  • 3
  • 19
  • 39
3
votes
1 answer

pyRevit WPF non-modal trouble

So I'm just starting to dip my toes into WPF in pyRevit. I tried to implement the pyrevit.forms.WPFWindow Class like this: # -*- coding: UTF-8 -*- """ Third-Party software credits: pyRevit: repository at…
Kyrre
  • 85
  • 1
  • 5
2
votes
1 answer

How to create square of walls via WPF in Revit python

I start learning pyRevit and here's the trouble. I want to create a WPF where I may enter values then Revit could would automatically construct a simple rectangular building. I have already create a WPF but I'm stuck in part where I need to connect…
John
  • 29
  • 2
2
votes
3 answers

ExtensibleStorage using RevitPythonShell

I am trying to take advantage of ExtensibleStorage in the Revit API. I'm trying to store an Array in a ArrayField. I think maybe my errors are due to the IronPython interface, but maybe someone has done this successfully? I know that the object to…
Kyrre
  • 85
  • 1
  • 5
2
votes
1 answer

Revit 2020 API - Family Document active view returning null after Family document is open and activated

I'm trying to get the active view of my family's document but it returns null. In Revit 2019, it would always return a value however I've recently switched to Revit 2020 and it seems to be giving me an issue. Has anyone else run into this yet and…
Cflux
  • 1,423
  • 3
  • 19
  • 39
2
votes
0 answers

Revit C# Skip loading pyrevit

I just got into using C# finally on Visual Studio and its great. I have a simple question. I have PyRevit loaded on my computer. When I run Debug on visual studio, PyRevit adds another 2 minutes in loading Revit. Since I am constantly running debug…
Cflux
  • 1,423
  • 3
  • 19
  • 39
2
votes
1 answer

Modify selection to first element by Selection.SetElementIds

I'm having trouble writing a script that lets med select the first element in my selection. This is useful for me because i select my correct Air Terminal from a schedule (where I can see the similar air-flow which I want to use) and use the command…
Kyrre
  • 85
  • 1
  • 5
2
votes
0 answers

Unexpected Error with FilteredElementCollector in pyrevit

Beginner in python, pyRevit, and Revit API so my apologies if I'm phrasing my question poorly. Today I used pyRevit to develop a simple pushbutton tool that worked, and then after a few minutes stopped working without anything being changed (that…
2
votes
3 answers

How to automatically handle DialogBoxShowing event in Python(Revit Dynamo)?

How do I subscribe to Revit events in Python (Dynamo)? Specifically DialogBoxShowing so I can see if it is "Export with Temporary Hide/Isolate" warning and select "Leave the Temporary Isolate Mode on and Export"? It is done in C#…
JayW
  • 23
  • 3
2
votes
2 answers

Coding with Revit API: tips to reduce memory use?

I have a quite 'general' question. I am developing with Revit API (with python), and I am sometimes observing that the Revit session gets slower during my tests and trials (the longer Revit stays open, the more it seems to happen). It's not getting…
Arnaud
  • 445
  • 4
  • 18
2
votes
3 answers

How to access all the family types through revit API?

Is it possible to access all the family types of a certain category (e.g. Windows, Doors, ...) with Revit API? In contrast with the instances. For what I know, using FilteredElementCollector(doc).OfCategory(...).ToElements() or…
Arnaud
  • 445
  • 4
  • 18
1
vote
1 answer

Hide elements in Sheets or Revit Document

I am Having a doubt in Revit API. I want to hide some elements in Sheets of the Revit document. But I need an Active view to hide that. view.HideElements(ids) If I take a view which is active and try to hide elements in it, I am getting exception…
Rocker-APK
  • 51
  • 6
1
vote
0 answers

Make Python scripts as an Addin for Revit

How to pack Python scripts as a standalone add-in for Revit, hiding the code from users? I am currently using pyRevit to create Python scripts for Revit. However, I want to create a stand-alone add-in that does not require pyRevit to be installed. I…
ehudahan
  • 11
  • 1
1
vote
0 answers

Handling warning in dynamo python

I’m getting this warning window while convert .sat to .rfa. How can I handle this warning automatically using dynamo python. I have also referred IFailurePreprocessor, but couldn’t use it before the warning message doesn’t falls under that category.…
Ramyaa V S
  • 21
  • 2
1
2 3 4 5 6 7