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.
1,344
questions
0
votes
0
answers
19
views
Clone object in Forge Viewer
I'm trying to clone an object in Forge Viewer.
I have tried using THREE.js and creating a clone but it has different structure to the base object.
sceneBuilder = viewer.loadExtension("Autodesk....
0
votes
0
answers
13
views
How to get the Dialog Box Message from a Revit Dialog Box Showing Event
I was wondering if there is a way to get the string message from the revit dialog box showing event. I am able to get the DialogId but not the description message of the revit warning.
public Result ...
0
votes
0
answers
15
views
Must create DependencySource on same Thread as the DependencyObject error when binding to observable collection inside Revit dockable panel [duplicate]
I'm currently working on a dockable panel inside Revit where I want to show a list of families in a TreeView.
Because our collection of families is rather large, and located on a network drive the ...
1
vote
1
answer
58
views
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 ...
0
votes
2
answers
39
views
How to create a Slanted wall with Revit API?
Im trying to develop script for myself in dynamo(Revit 2021), but I don't understand how can I create the slanted wall?
According to this blog of changes in revit 2021, there are such parameters for ...
0
votes
1
answer
34
views
Searching buffer string using Nodejs
I have an Revit .rvt file (which is a .7z file under the hood), which I know contains a specific phrase within the first 30,000 bytes. I've attempted to use Nodejs to read it to a buffer, convert it ...
0
votes
1
answer
16
views
How can I overwrite the exported CSV file using Python in Dynamo for Revit?
This Dynamo/Python script is working great. I'm just trying to do the same but overwrite the file with the new export every time I export. I don't need to append or save any older version. Just the ...
0
votes
1
answer
21
views
'No connection string named 'IICMDATAEntities' could be found in the application config file.' EF6 - Revit Add-in
am build file .dll Revit Add-in has Entity Framework 6 and my errors enter image description here Help me
0
votes
1
answer
30
views
How to get rebar's material in Revit?
I'm new to Revit API and I can use "GetMaterialIds(false)" to get the materials of an element, but it seems doesn't work for rebar. But I found the "GetMaterialIds()" method in the ...
0
votes
2
answers
34
views
Revit failed to Load ImagePath
i try to Place a Temporary In-Canvas Graphic in Revit like this:
var activeUiDoc = document.Application.ActiveUIDocument;
var activeDbDoc = activeUiDoc.Document;
using (var ...
1
vote
1
answer
26
views
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
...
1
vote
2
answers
54
views
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 ...
0
votes
0
answers
14
views
Draw an image using LUA and set fourth parameter
This is a code in lua I am using for revit to draw shapes.
line(A) -- erzeugt kurve mit index 0
line(B, angle.radians(math.asin(D / B))) -- erzeugt kurve mit index 1
line(C, angle.radians(-math....
0
votes
0
answers
9
views
Differences between Dynamo for Revit and Grasshoper for Rhino
if there are experts users of both plug-ins, could someone please elaborate on the differences in the functionalities? Are there design tasks which can be solved/performed with the one but not with ...
0
votes
2
answers
27
views
Importing a .dll reference - can't find solution explorer or add reference in VS 1.66
Going to preface this post with the obligatory, "I'm new to coding and to VS so go easy on me! I'm learning."
With that being said, I'm writing a script for an architectural program called ...
1
vote
1
answer
87
views
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 ...
-1
votes
3
answers
93
views
Calculating room length issue
I want to get the length and width values of a room within Revit but it appears that Revit does not give access to these values like it does with room perimeter, area and volume.
I decided to start by ...
-1
votes
1
answer
79
views
Get one solid from element in Revit
Converting Autodesk.Revit.DB.Element to Autodesk.Revit.DB.Solid
I already tried to extract all solids from element, and that's was okay, I had a list of 2 - 10 solids.
But the problem is that I ...
-1
votes
1
answer
121
views
Creating bounding box for a polygon using Revit API in C#
I am trying to create a bounding box for any given ploygon using Revit API. Can someone help?
namespace Revit_SquarePlacement.Command
{
[Transaction(TransactionMode.Manual)]
class cmd_Training ...
1
vote
0
answers
29
views
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 ...
0
votes
1
answer
37
views
Please share the process to merge C++ plugins from Autodesk 2016 to Autodesk 2022
We have several plugins working in C++ with Autodesk 2016 so now wants to have these plugins working on Autodesk 2022 by upgrading Autodesk version. Please share the complete procedure for this.
...
0
votes
1
answer
75
views
How to list all running workitems in Forge - Design Automation for Revit?
I would like to get running workitems to track progress of the posted workitems.
It is possible to get details to a given workitem by providing an ID, like this:
https://developer.api.autodesk.com/da/...
0
votes
0
answers
46
views
place host based family in linked model - Instance origin does not lie on host face error revit api
i have made a plugin that places a duct hanger family (which is host based) automatically.
it works fine when i aplly it on a regular model (with the achitecture included)
but when i try to run in on ...
0
votes
2
answers
68
views
How to access current folder in a Forge - Design automation app
I have created a forge app, for revit, using the provided deleteapps design automation template, and the design automation API. The goal of this app is to process and export content from revit file.
...
0
votes
1
answer
27
views
is there a way to make changes to a Revit model from VR in real time?
There are various methods to interact with Revit models in VR, enabling a real-time update of the VR environment, when changes in the Revit model are done. I am wondering if there is a way for the ...
0
votes
1
answer
67
views
How to get XYZ data of room center?
I am trying to place an element into the center of several rooms. So far I have achieved something similar by using the Location Point which has placed the element close to the center but not exact.
I ...
0
votes
0
answers
8
views
clicking a button inside tab control/ tab page - revit form
i am trying too use a tabControl panel to put multiple features in a single form.
how can i make a button inside a tab clickable? it seems as if the button is not active when its being clicked from ...
0
votes
1
answer
30
views
Revit API : SaveAsCloudModel failing with exception : Cloud model Entitlement
One one particular BIM360 hub the API: Autodesk.Revit.DB.Document: SaveAsCloudModel(Guid accountId, Guid projectId, string folderId, string modelName) throws the exception:
You do not have cloud model ...
0
votes
1
answer
109
views
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 ...
0
votes
0
answers
71
views
How to Calculate the Accurate Paint Area in Revit or Revit API?
I have completed the 3D modeling of the building in Revit, and now I want to calculate the area that the building needs to be painted in order to estimate the project price.
However, I spent a lot of ...
0
votes
1
answer
34
views
Dynamo in Revit 2020/2021 wont import sqlite3
Using the following imports in a python node in Dynamo for Revit 2020 or 2021 (2019 and 2022 work fine)
import clr
import sys
sys.path.append(r'C:\Program Files (x86)\IronPython 2.7\Lib')
clr....
0
votes
2
answers
69
views
Duct hanger - place family instance Revit API
i'm trying to place a family using the API (c#).
When using the NewFamiltInstace overloaded method that takes (location, symbol,host, level, structural) - i'm expecting to get the instance of the ...
1
vote
1
answer
18
views
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 ...
0
votes
0
answers
37
views
Python (for Revit Dynamo): unexpected token in while loop iteration
I'm a Python noobie trying to find my way around using it for Dynamo. I've had quite a bit of success using simple while loops/nested ifs to neaten my Dynamo scripts; however, I've been stumped by ...
0
votes
1
answer
46
views
Common properties between revit and naviswork to map objects
We are facing the issue for finding some common properties/ids so that we can map revit model object id with naviswork model objects. Can you please let us to find any common properties/id?
0
votes
0
answers
140
views
Deprecated API usage: No "GlobalWorkerOptions.workerSrc" specified
I have a Forge Viewer integration (v. 7) in my Vue and Nuxt.js app. Recently, my company decided to upgrade our Revit files to version 2022, and since then we haven't been able to load the 'viewables'/...
0
votes
1
answer
121
views
Revit API - Finding the path of nested links
I am trying to find the file path of nested links and ran into a problem.
I am interested in the 2nd level, meaning finding the file path of a link inside one of the links in the file that I currently ...
0
votes
0
answers
24
views
Forge Model Derivative API - Invalid request body or parameters
When attempting a translation job using the Forge Model Derivative API, I'm getting the response "Invalid request body or parameters". I'm doing this via Terminal app on OSX.
Once the RVT ...
0
votes
0
answers
45
views
Empty IFC export Result
I've created the Revit addin that exports 3d views from the working set.
If I am not assign activeViewId to the FilterViewId options, I am getting the whole model in each IFC result file with the ...
0
votes
1
answer
69
views
Use a Local Model file for Online Viewer
I would like to be able to use a local navisworks or revit file to be available when using an online viewer app on forge.
I have so far followed the tutorial here - https://learnforge.autodesk.io/#/...
0
votes
3
answers
366
views
"Failed to initialize the [add-in name] because the assembly [path to an add-in DLL file] does not exist" when launching Revit
I've exhausted every resource possible and can not figure out what the issue is. Button images won't show & keep getting this message when I try to use the command.
Failed to initialize the [add-...
0
votes
0
answers
38
views
Error "The filter value is not valid for the field and filter type."
When I use ScheduleFilterType with "HasValue" it works, but when I use ScheduleFilterType.Equal happens an error. should I use other method instead ScheduleFilter?
def CreateSchedule(...
0
votes
1
answer
140
views
issue adding images to buttons using visual studios 2022 C# for revit
I'm running into an issue where everything works fine until I try to throw in the images. I'm trying to pull them in as resources from inside vs. Not sure what to do here being new to C#. Below is the ...
1
vote
2
answers
107
views
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....
0
votes
0
answers
174
views
pycharm - cant install clr package
I'm trying to install the clr package to my pycharm for debugging dynamo python scripts in Revit but am running into issues. I'm pretty new to using pycharm and am unfamiliar with it.
EDIT: I'm also ...
0
votes
1
answer
207
views
Create Model Line using Revit API
I try to create Model Line on Picking edges, But while I pick edges on structural beam especially I'm getting an error. I have attached my code and error image below,
can anybody help in solving this.....
0
votes
1
answer
102
views
Revit Dynamo RevitPythonShell - Python Debugger - ImportError: No module named _wpf
I'm trying to get the Revit python shell debugger working in my dynamo but I'm running into issues. It seems to run in Revit alright but I cant get the debugger in dynamo to work as shown here.
Also ...
2
votes
0
answers
101
views
Create buttons in loop with different actions - Python
I am working on Dynamo for Revit. My code takes sheet numbers and other info, then creates labels and buttons for each IN element with a for loop. The GUI works fine and I have all the elements in ...
0
votes
1
answer
36
views
access duct insulation thickness value
I am writing API for Revit using C#, try to add insulation code for different type and thickness, to be tagged wit duct size.
I can get ductID, InSuID of the duct, and insulation name, however I ...
1
vote
0
answers
32
views
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 ...