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 to zoom a sheet in revit api?

I wrote an external command that creates detail views for doors, windows, etc and puts each object in a separate sheet. Sometimes the new sheets are zoomed-out by default (the yellow circle shows the actual sheet). I guess it has to do with the…
EyalS
  • 1
0
votes
2 answers

Filtering walls by Base Constraint: The filter value is not valid for the field and filter type

I'm having difficulty trying to filter out walls by the WALL_BASE_CONSTRAINT. This is the code I currently have. The Build is successful but when I execute the plugin. I come up with the exception: The filter value is not valid for the field and…
Mah Noor
  • 83
  • 1
  • 11
0
votes
1 answer

How do I catch Revit errors in Revit API?

I'm trying to catch an error displayed in Revit to perform some handle operations. Error is due to the connection of points as shown in the image below. Error image This is what I have tested with so far. try { var pipe = Pipe.Create(doc,…
Han
  • 5
  • 3
0
votes
1 answer

Revit API transform "cannot access with an instance reference"

I'm experimenting with transforms. And trying to perform and store multiple transforms, but unable to probably due to the static property of transforms. Something like this: Wall wall = doc.GetElement(id) as Wall; BoundingBoxXYZ wallBoundingBox =…
Han
  • 5
  • 3
0
votes
1 answer

How to select all instances of family in Revit?

I am creating a plugin for Revit 2019 and want to select all the instances of specific family and type through API. "ElementClassFilter" is available in Revit sdk to filter the elements but I want to display all instances of same type in blue lines.…
Mah Noor
  • 83
  • 1
  • 11
0
votes
2 answers

Is there a fix for Revit 2019 plugin to use the latest version of CefSharp?

I'd like to know if there is something new to the issue with Revit 2019 and CefSharp, thanks!
0
votes
1 answer

How to find the position of a linked Revit file

I am Writing an app to find the position of the Revit links in the Project. I use the locationPoint but it gives null. T FilteredElementCollector collector = new FilteredElementCollector(myDoc);// …
Uam
  • 3
  • 2
0
votes
1 answer

How to rotate a family Instance in revit

[enter image description here]In my model there is a framing element and I am calculating the edges of that element but the element is rotated and has different face orientation for ex (0.4 , 0.6 , 0.2) . I want the coordinate of edges of the…
Saurabh Agrawal
  • 150
  • 1
  • 13
0
votes
1 answer

Un-subscribing from event in other events

I'm failing to un-subscribe to an event while using a BackgroundWorker to handle when the un-subscribe event should be fired. I can un-subscribe in the AsyncRunner but not in BackgroundWorker1_RunWorkerCompleted. Context: This is part of a plug-in…
Motto
  • 1
  • 1
0
votes
1 answer

Idling and ExternalEvent are not raised while an Element is selected

I'm building a Revit AddIn with WPF modeless dialogs and I want to use an ExternalEvent to retrieve Elements selected by the user. Is what I am doing viable and what do I need to change for it to work? Since I don't have a valid API document…
Arza
  • 3
  • 3
0
votes
1 answer

Create Revit Sheets from Excel with multiple project parameters

Hi I have a macro that creates multiple sheets and has Name, Number, Sheet Category. The last being my own project parameter. I can successfully create the sheets with name and number but I am having difficulty adding the value from CSV file to the…
Simon Palmer
  • 384
  • 1
  • 2
  • 13
0
votes
3 answers

Is this a way to show a modeless dialog from a dockable pane using WPF?

I'm building a Revit plugin. It consists of a dockable pane that (among other elements) has a button. I want to open a new, separate window when a user clicks this button. At the moment, i create a new Window, but i don't know if that's the right…
Marija Rakic
  • 140
  • 2
  • 11
0
votes
1 answer

How to use Revit SDK example in creating revit-addon?

Im learning to create addin for revit and was trying to create using example below. So i got the code from revit api.chm, the question is how do i use it as revit Addin? Thanks you very much. namespace somenamespace { …
Lucifer
  • 3
  • 2
0
votes
2 answers

Why is my DLL still being used by Revit after execution?

I have a small C# code I wrote for Revit API: public List Read_temp_file(string filename, Application app) { string username = Environment.UserName; string myPath = "C:\\Users\\" + username + "\\AppData\\Roaming\\pyRevit\\" +…
Arnaud
  • 445
  • 4
  • 18
0
votes
1 answer

How to access Revit Application out of an Execute method in Revit API?

I have been playing with Revit API through pyRevit for quite a while (so, using Python) and I now also need to use C# for some parts of my code. I am trying to access the VersionNumber property, provided by the Application class. Doing that using…
Arnaud
  • 445
  • 4
  • 18