Questions tagged [revit-api]

Revit's API allows users to create customizations of the Autodesk Revit environment with tools that can greatly enhance end users' capabilities. The program is built around Microsoft's .NET Framework.

Revit's API allows users to create customize the environment with tools that can greatly enhance end users capabilities. The program is built around Microsoft's .NET Framework.

Resources:

Forums:

977 questions
0
votes
1 answer

How can I set transparent walls in a given view with Revit API?

I try to set transparent walls, using pyRevit. I do the following: categories = List[ElementId]() wallCatId = ElementId(BuiltInCategory.OST_Walls) categories.Add(wallCatId) ogs = OverrideGraphicSettings() ogs.SetSurfaceTransparency(70) t =…
Arnaud
  • 445
  • 4
  • 18
0
votes
2 answers

Revit API python Error:Exception: idx can be only 0, 1, 2

Can someone help me understand this error. I'm still learning the Revit API (and python) and searching hasn't helped. I'm trying to get the xyz Location Point of an element. here is my code: elements= ui.Selection() for d in elements: for l in…
user3808752
  • 169
  • 4
  • 14
0
votes
3 answers

Why does "ElementId(BuiltInCategory.OST_Walls)" fails within Revit API 2019?

I am trying to filter walls. For that I use categories = List[ElementId]() myId = ElementId(BuiltInCategory.OST_Walls) categories.Add(myId) ..but this obviously doesn't return a valid ElementId, as when I print it, it has some negative value (and…
Arnaud
  • 445
  • 4
  • 18
0
votes
1 answer

Revit API : Access components in particular floor using Autodesk.Revit.DB

I am working on a pluggin for revit 2019: trying to obtain list of rooms and tags segregated seperately for each floor in a revit model using c#, I have been able to obtain all the rooms data in the entire model but unable to segregate based on…
0
votes
1 answer

Using the on_click option for a REVIT RPW flexform button

I've been stumped by this for hours, can someone point me in the right direction? I know the default for a button click is FlexForm.get_values, I'm trying to call my own functions. I can't figure out where I'm going wrong. I know my mistake is in…
user3808752
  • 169
  • 4
  • 14
0
votes
1 answer

Why is PickObjects with Selection filter slows down my selection - PickObjects(ObjectTYpe, ISelectionFilter, String)

Why is PickOjects with Selection Filter slower than the PickObjects with out Selection Filter in IExternalCommand(Add-in). I try inputting code inside Revit Macro and see no difference in both methods. My code is working fine(Please see below) The…
0
votes
2 answers

How to access IFC mapping file programmatically?

Does Revit API provide a way to access IFC mapping file programmatically? I guess I can navigate to the file using the standard methods that manipulate files on a file system, but I was wondering if Revit has a way to it easier.
Marija Rakic
  • 140
  • 2
  • 11
0
votes
1 answer

python for revit - collect views in active view

I'm trying to use a FilteredElementCollector inside my pyRevit script to collect all views (sections, elevations, plan callouts etc.) in the active view. from pyrevit.framework import clr from pyrevit import revit,…
0
votes
2 answers

Register a reactor to trigger on a custom parameter with the API?

I have a reactor that has to react to changes done upon a custom parameter. When you register the reactor, you specify the type of change it reacts to. UpdaterRegistry.AddTrigger(updaterId, RevitFilters.StructuralElementsFilter,…
CristiNC
  • 18
  • 3
0
votes
1 answer

Revit project browser organization through RPW, python and the revit API

is it possible to expand/collapse items (ie views, sheets, legends, etc) in the Revit project browser window through the Revit API and RPW
user3808752
  • 169
  • 4
  • 14
0
votes
1 answer

using python to access an element's parameter value through RPW

I'm not sure what I'm doing wrong. My code is # -*- coding: utf-8 -*- from rpw import revit, db, ui, DB, UI import clr # Import RevitAPI clr.AddReference("RevitAPI") dd1 = db.Collector(of_category='Data Devices') for d in dd1: …
user3808752
  • 169
  • 4
  • 14
0
votes
0 answers

How to check all selected check boxes when you check one in C# datagridview

I'm pretty new to C# development, but here goes. I'm working on a plugin for Autodesk revit, which creates a windows form with a datagridview on it which gets populated with several checkbox columns when the form loads. What I would like to do is…
DSquad
  • 101
  • 5
0
votes
1 answer

Is it possible to create an acute elbow?

Suppose I have two ducts, and the angle between them is less than 90 deg. Is is possible to create ONE SINGLE elbow that is less than 90 deg? Let's first define ACUTE and OBTUSE: For a common duct elbow, it is usually generated by a SWEEP model. If…
Jolinpiggy
  • 50
  • 7
0
votes
1 answer

C# Revit API, how to create a simple wall using ExternalCommand?

I just wanted to learn Revit API and create a simple wall using ExternalCommand. But I cannot figure it out... I think my problem is here: var symbolId = document.GetDefaultFamilyTypeId(new ElementId(BuiltInCategory.OST_Walls)); When I debug it…
jeefo
  • 164
  • 1
  • 12
0
votes
4 answers

Initiate BIM360 Docs collaboration programmatically

In order to upgrade to the current version of Revit, we have to migrate our files from from BIM360 Teams to BIM360 Docs. Since we have hundreds of documents, I am looking to automate this process as much as possible. The forge API allows me to…
jonatans
  • 13
  • 1
  • 3