115 questions
0
votes
0
answers
31
views
How to run DynamoModel and Autodesk.DesignScript in C# addin
is there a way to use StartupUtils.MakeModel in revit API ? i'm making an Revit addin in C# based on a Python script that uses DesignScript.Geometry , this script works well but i'm trying a lot of ...
0
votes
0
answers
160
views
How to handle a Dialog Box In Revit with Revit API?
While working with pyRevit and Revit API to convert a file from one format to another, I am encountering the below dialog box with the ID - Dialog_Revit_DocWarnDialog. Selecting 'Unjoin Elements' is ...
0
votes
0
answers
33
views
Issue for loading XAML layout inline as a string
I’m using pyrevit, and my WPF form is not being displayed (no error appears on the screen). The XAML layout is defined inline as a string. Interestingly, in another form where the XAML layout is also ...
1
vote
1
answer
47
views
Event Handlers to change selection from Combobox
I'm implementing a UI using WPF to create grids in Revit. To allow users to switch between numeric values ('1, 2, 3, ...') and alphabetic values ('A, B, C, ...') for grid names, I used a ComboBox, as ...
1
vote
1
answer
207
views
Isolate elements by workset in Revit
Is there a tool in Revit that allows to temporary isolate elements by a workset?
For example - I have a MEP project and I want to isolate in 3D view all elements which are on Plumbing workset.
By now ...
0
votes
1
answer
79
views
Can't unsubscribe from an event in Revit
I'm trying to set up the UI to automatically clear elements when I subscribe to an event DialogBoxShowing. I can't unsubscribe from it and the replacement of user actions continues even when the code ...
0
votes
1
answer
162
views
How to import Revit room into a Power BI report? Or create a topojson/geojson file from Revit rooms?
I am attempting to import data from Revit rooms into an interactive Power BI report. I would like to bring the room geometries into the PBI report and link it with external data tables, creating ...
0
votes
0
answers
129
views
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']
...
0
votes
1
answer
275
views
Getting wrong width for thickness of element in Revit using Revit API
I created a plugin with PyRevit using Revit API to get the materials in a layer used in the model with their thickness, but the result coming from API is not the same result that I gave to materials ...
0
votes
1
answer
1k
views
New Floor.Create() method Revit 2023 APIs with Python
I'm currently working on developing a Revit plugin through pyRevit and I'm having some trouble creating a new Revit triangular Floor starting from three vertices defined in Python. I am new to Revit ...
1
vote
1
answer
305
views
Is it possible to keep track of the Revit ribbon buttons which were clicked on?
I've been trying to figure out a way to record user interface actions to retrieve information about which ribbon buttons were clicked, but I've been unsuccessful so far.
I've spend a lot of time ...
1
vote
2
answers
105
views
Filter down list of elements by comparing their name properties to a list of potential partial matches
I'm working in python and Revit, and I have a list of detail items with a name parameter. I'd like to filter my list down just the detail items where the name contains a partial match for any string ...
0
votes
0
answers
34
views
WPF listview in pyrevit -> showing properties [duplicate]
I am a user of pyRevit and I am trying to create my own script with UI.
I am trying to create listview with view templates in revit. In this listview I want to show Name of the view templates.
...
0
votes
2
answers
927
views
Selection, Sorting and Highlighting Elements in the selected order using PickObjects() method (Revit API)
Is there a method Revit API where I can select elements in order, highlighting the elements selection.
Please note, Selection.PickObjects() does the selection & highlighting but does not save the ...
0
votes
1
answer
533
views
Revit API changes wall parameters: from metadata it showed the correct result, not reflected in UI however
Using revit-python-wrapper to create Wall then adjust the Wall height and Wall offset to the ground.
Here is the code
from rpw import db
from rpw import DB
start_point = XYZ(0, ...
2
votes
1
answer
311
views
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 ...
0
votes
4
answers
2k
views
How can I activate (display) a view (floor plan or Level) using Revit API?
I am trying to activate a view using Revit API. What I want to do exactly is to display the level or floor plan view. So the view I want to activate ( I mean, I want this view to be actually shown on ...
1
vote
1
answer
952
views
Getting access to a sheets Title block using python
Dynamo Script
Within Dynamo I was able to adjust the title block per sheet but I was requested to simplify it into a button click using python only.
I can find the sheets but I can not adjust the ...
1
vote
1
answer
767
views
Is it possible to continue working in Revit while running a python script in pyrevit?
When running Revitpythonshell or running a python script with XAML gui I am unable to work in Revit until closing Revitpythonshell or the python gui.
Is there a way to keep Revit from becoming ...
0
votes
1
answer
844
views
How to check if an ElementType is placed in revit model?
I have collected element types using following code in Ironpython:
typeelements = DB.FilteredElementCollector(revit.doc)\
.OfClass(DB.ElementType)\
.ToElements(...
0
votes
1
answer
2k
views
How to get type parameters of revit family type?
I am trying to create a list of all type parameters using ironpython hosted by pyrevit. I tried following code
from pyrevit import revit, DB
doc =__revit__.ActiveUIDocument.Document
curview = doc....
1
vote
0
answers
446
views
C# - Revit API - How to debug multi-version Plugin for Revit?
I'm trying to debug my multi-version plugin for Revit however I'm having issues. It was originally created for Revit 2018 so it debugs fine in that, however when I switch the external program to Revit ...
0
votes
2
answers
674
views
Can't use pyrevit forms
I am trying (for a long time) to use pyrevit forms to open excel files, but everytime I try to use it, a different error appears. The most recent error is the one in the image.
If I try 'from pyrevit ...
1
vote
1
answer
610
views
Revit API Python SetBoxCenter() applied to multiple Viewports
in Revit, I have selected views (selvpsElements) that I want to align with a primary view (primaryCenter). I have the primary view center shown below:
primaryCenter = [<Autodesk.Revit.DB.XYZ object ...
-2
votes
1
answer
789
views
how to convert from C# code.where(...) to python in Revit API
I am trying to convert a C# code (for revit API) to python but to no luck.
The C# code looks:
public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
{
...