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
votes
0 answers

Roof Creation with Eave Heights

I'm trying to create the roof as shown in below image using the revit api. But using revit api it generates this output as shown below. Please let us know how we can create above roof using revit api. We are using only the model lines from revit…
-1
votes
1 answer

elem1.Location as LocationPoint).Point is returning null in the below code. Can anyone help me on this?

The code appears to aim at selecting multiple text elements and then arranging them with a specific horizontal distance between them. IList selectedRefs = uiDoc.Selection.PickObjects(ObjectType.Element,"Select text instances"); if…
-1
votes
1 answer

Change a parameter in SharedParameter Revit API C#

Please tell me how to change the ShouldHideWhenNoValue parameter in the SharedParameter loaded in the project. var collector = new…
-1
votes
1 answer

How to draw roof plan layout without any API

I'm trying to draw roof plan layout with only lines is there any logic or mathematical calculations needed to draw roof plan without any software only with code,below is the example
-1
votes
1 answer

What is a good alternative to the ViewSheetSet.OrderedViewList property that was added in the 2023 Revit API?

I built a feature in my add-in that automates the filling of dedicated issued date (shared params.) columns on the sheet list schedule. During initialization, I am fetching all the viewsheet sets and adding them to the list box on screen and a sheet…
-1
votes
2 answers

Getting the following 'Could not load type "System.IO.Directory" from assembly "System.Runtime, Version = 4.0.0.0"'

Currently, Whenever I launch revit to test my addin that is supposed to export the contents of ViewSchedules in a revit document to txt format. I suspect something is wrong with my project references, however I am linking RevitAPI and…
-1
votes
2 answers

Add Properties to string

It closed my original question. Fairly new to c# & I'm wondering if there is a way to do the following: string joint = "Press Joint" || "ProPress"; Would I achieve this using a switch statement? I.e. set the string to be empty & programmatically…
nhilson
  • 25
  • 8
-1
votes
1 answer

What causes the error "FilteredElementCollector_constructor or one item in the collection is null at line 326 of file" when running revit addin?

I have recently begun the task of converting a dynamo node i made in c# to an addin. But when i click the button to run the method it returns the command failure as shown in the image. I have tried to find some info on why this might happen, but i…
pfrom
  • 11
  • 2
-1
votes
1 answer

Forge viewer - Download pdf derivative via API

Can I download a pdf from a derivative via API?
Jihai
  • 110
  • 8
-1
votes
1 answer

Revit svf vector and inventor svf vector are different from each other

I want to view revit and inventor files at the same time using autodesk forge. But one of the files is not standing straight. to the revit file; model.getUpVector() output when i type (3) [0, 0, 1] to the inventor file; model.getUpVector() output…
-1
votes
3 answers

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 finding the length value for a room through code…
Anderson
  • 5
  • 3
-1
votes
1 answer

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 cannot merge these solids to one using…
kiryha
  • 1
-1
votes
1 answer

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 : IExternalCommand { public Result…
Hunter
  • 1
-1
votes
1 answer

Is there an updated walk through discussing the WindowsWizard file in Revit 2022 SDK? also is forge actually required?

I would like to create a Revit add-in that is able to create, modify and produce a window or door that can be loaded into Revit. I would also like to be able to use that information to fill out a window or door schedule. I found the windowWizard in…
Miguel
  • 1
  • 2
-1
votes
1 answer

How to limit the amount of parameters for concatenatenation?

The idea of the program is to concatenate different parameters and put it all inside another parameter. How to let the end user decide if he wants to concatenate 2 or 3 parameters. Right now it is like if you don't put in 3 parameters it won't work.…
fysharp
  • 101
  • 7