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
0
votes
1 answer

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 as thickness. For instance I tried this code: #…
0
votes
1 answer

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 APIs and I'm currently using Revit 2023. I am…
0
votes
1 answer

WPF & Python: getting checkbox values from datatemplate

I'm not sure if this is the correct place to ask this, but here goes nothing: I am creating a wpf window with code behind in Python. I can’t seem to figure out how to get the selected items of my comboboxes though (they are in a DataTemplate). This…
PieterL
  • 3
  • 1
0
votes
0 answers

is it doable to use C# dll directly in pyRevit generated UI?

pyRevit can add custom UI for python, Dynamo script, just wonder if it's doable for C# dll? well, i can use zero-touch to convert C# dll to Dynamo node but if can use directly then i can skip this extra step
bim2016
  • 105
  • 1
  • 10
0
votes
1 answer

Simplify a series of repetitive functions with sort options

I have a series of functions in a module which are starting to become quite repetitive. Each function extracts a list, and has an optional boolean argument to sort the list before returning it. Feels like there ought to be a way to inherit the…
mybluesock
  • 21
  • 4
0
votes
0 answers

Can not add Calculated Value to Schedule

I'm working to create Schedule on Revit by C# but Can not add Calculated Value Create Schedule on Revit By C#
0
votes
0 answers

WPF listview in pyrevit -> showing properties

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. Currently what I achieved can be shown on attached below…
Kml123 P
  • 1
  • 1
0
votes
2 answers

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 elements in the order of Selection.
0
votes
1 answer

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, 0, 0) end_point = XYZ(45, 0, 0) …
cdhit
  • 1,384
  • 1
  • 15
  • 38
0
votes
1 answer

Get Name of WallType in PyRevit

How do I get the Name of a WallType in PyRevit? I can get to FamilyName, but it's not what I want, I want the exact name of the wall (e.g., '300mm concrete'). The code I use: from Autodesk.Revit.DB import * doc =…
Dmitri Nesteruk
  • 23,067
  • 22
  • 97
  • 166
0
votes
1 answer

How to retrieve the openings of Wall (not the coordinates)?

I have retreive the levels as treeview(List of levels in treeview in WPF form) and then selected a wall(e.g xyz_wall) from a specific level(e.g. Level1) in Revit project, I want to retrieve the list openings(doors and windows) of selected wall and…
Abhijit
  • 9
  • 4
0
votes
4 answers

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 screen) already exists, and I can access its…
Abhijit
  • 9
  • 4
0
votes
0 answers

Revit API 2021: ImageType API

I'm trying to create a raster image instance in my model using the new ImageType API in Revit 2021. However, it keeps giving me an error. My code snippet: from rpw import DB image_options = DB.ImageTypeOptions("C:\\temp\\response.jpg", False,…
Yongjoon Kim
  • 107
  • 1
  • 8
0
votes
1 answer

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() How to know whether an element collected in…
shahabaz sha
  • 61
  • 1
  • 9
0
votes
1 answer

Raycasting to calculate the volume of a space

I'm trying to use ray casting to gather all the surfaces in a room and determine it's volume. I have a centroid location where the rays will be coming from, but I'm drawing a blank on how to get the rays in all 360 degrees (in 3D space). I'm not…