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
1
vote
1 answer

Forge design automation for Revit fail after our code finish

We are experimenting with Design automation for Revit and have gotten stuck on a failure that is hard to debug: basically our code finish and then forge takes over and fails. Here is part of the log: I have marked in green what part are "our"…
Erik83
  • 539
  • 3
  • 5
  • 19
1
vote
1 answer

How to get extents in a drafting view in Revit

I want to be able to mirror all of the elements in a drafting view according to the midpoint of the x value extents of the drawing. xMidpoint in the example below is what I'm trying to get. I have Revit 2012 available. int xMidpoint; Plane plane =…
skeletank
  • 2,880
  • 5
  • 43
  • 75
1
vote
1 answer

How to use Revit API to create a structural wall?

I already know how to create a Architectural wall using Revit API. The code is something like this. Notice, I am also use Revit Python Wrapper in my code. def create_wall(a, b, c, d, e, f, g, h): doc = revit.doc with rpw.db.Transaction('Test Is…
cdhit
  • 1,384
  • 1
  • 15
  • 38
1
vote
1 answer

Common Unique Id between revit and forge document

We were using Revit Project Information as Unique Id between the revit and forge document. But as checked the Revit Project Information Unique Id came same for two distinct file. Is there any other Unique Id between revit and forge document which is…
1
vote
1 answer

Visual Studio - C# - multiple assemblies with same namespace conflict - alias get ignored

I'm working on a Plugin for a software (Revit) using its API (RevitAPI.dll). Some functions in the API have been changed in the latest version 2022 so I'm trying to implement these differences in my code. I'm loading the 2020 API with the alias…
cafu23
  • 17
  • 5
1
vote
2 answers

revit-API:How to get the "Offset" in the "View Range" in the "Plan Region"?

my idea I tried to use "SetViewRange" to get "View Range" in "Plan Region", but "Plan Region" is not "View Plane", only "ViewPlane" can use "SetViewRange" method, so this idea failed. There is a parameter named "View Range" in the "Parameter" of…
smile-jie
  • 11
  • 1
1
vote
2 answers

Autodesk Forge - How to get all available family in revit file

I am using Autodesk Forge to build a web app, I want to get categories, families, and family types in the original revit project. I have researched but all I can get is families that have instances on view. Can I get a family that doesn't have an…
1
vote
1 answer

How to count all Element in that are similar to the FilteredElementCollector Symbol family of Special Equipment?

When I use DesignAutomation (Autodesk Forge) to count the number of BuiltInCategory.OST_SpecialityEquiosystem elements visible on the Revit file by getting the FilteredElementCollector lstEleCollector = new FilteredElementCollector (doc,…
1
vote
1 answer

Python 3 for Revit 2022: typeerror: instance property must be accessed through a class insctance

I`m converting a python 2.7 script to python 3. The script is used in Dynamo for Revit 2022. In 2.7 the code works but in python 3 it gives a typeerror: instance property must be accessed through a class insctance. Can anyone help with this? def…
Wouter
  • 11
  • 1
1
vote
1 answer

Handling failures when opening a Revit file (before any transaction)

I'm developing a Revit plugin in C# for exporting data from Revit files. This plugin is used through the Design Automation API (i.e. without user interface, obviously). The whole process works fine for some RVT files. Unfortunately, for some other…
user15468527
1
vote
1 answer

Bring REVIT Areas to FORGE VIEWER

I wanted to know if there is some quick way to have the 'Revit Area items' available at the Viewer, via the self Viewer API or Model Derivatives preferably, or any solution that you have in mind of course will be aprettiated too. Thanks in advance.
M Rom
  • 11
  • 2
1
vote
2 answers

Revit Python Shell / Revit Python Wrapper - get Element name by id

I'm trying to get the name of an element by way the ID using Revit python wrapper in Revit python shell but I'm having issues. I am typically able to do it using c# but rpw is new to me. I try: doc.GetElement(2161305).name or…
Cflux
  • 1,423
  • 3
  • 19
  • 39
1
vote
0 answers

Weird theming issue with multiple assemblies

I am running into a weird issue with MahApps Themes when different assemblies create windows in succession. The assemblies are .DLL Add-ins for Autodesk Revit. Since I am the one creating both, I have also made sure they reference the same versions…
dvdgnz
  • 11
  • 1
1
vote
1 answer

Revit - Apply divided surface to walls

I write a program that forms a divided surface using a reference to the face of the shape. But when applied to walls (the search string with category selection is highlighted below), the program does nothing. How do I apply this program to all walls…
All In
  • 89
  • 1
  • 6
1
vote
1 answer

Access-DB(.accdb) access crash app when using OleDbConnection.Open()

I recently tried to use access database with C# code inside a little Revit plugin but it crash when I use OleDbConnection.Open() Here is my snippets: CPFMainModelView mainModelView; static readonly string connectionString =…
Thomas_Lcp
  • 19
  • 5