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
2 answers

Given two family instances with the same LocationPoint how can I get instance #1 and #2 to have the same orientation

In the Revit API I'm trying to replace a family instance of the "Specialty Equipment" category with with an almost identical version of the category "Mechanical Equipment". So far I've been able to insert the new instance in the same location as…
skeletank
  • 2,880
  • 5
  • 43
  • 75
0
votes
1 answer

How do i get rotation of wall using revit api?

If an Element is family instance then: (FamilyInstance.Location as LocationPoint).Rotation; I can easily get a rotation easily for family instance. If I try for wall Curve curve = ((Wall).Location as LocationCurve).Curve; Or anything like that.…
Arvind Maurya
  • 910
  • 12
  • 25
0
votes
1 answer

Associating Directshape with Level Revit API

Is it possible to associate directshape element with level? I've tried to manually insert it by parameter, but there is no level parameter in parameters, and setting level directly doesn't work because its a read only. Is there any other way that I…
0
votes
3 answers

Revit API How to make a external command run asynchrously?

I have an External Command to create about 40 (or even more) Generic model in Revit. I want to make Revit run the command asynchronously to speed up the process according to this flow: load command -> run command -> load families -> generate family…
Thế Long
  • 516
  • 7
  • 19
0
votes
1 answer

How to convert the element's reference file absolute path to relative path in Revit api

i get the revit element's reference files, and then i want to convert the reference file absolute path to relative path.How to convert? ths! The code as follow: Uri uriRoot = new Uri(AnaysisResultRootFolder); foreach (ElementId elementId in…
Jason Lee
  • 77
  • 7
0
votes
2 answers

Get BuiltInParameterId from BuiltIn Parameter ElementId in Revit

Is there a Way to get the BuiltInParameterId (Ex:BuiltInParameter.SHEET_SIZE) from a Parameter ElementId. I have a number extracted from an Schedule Field (-1010106) and I want to get the BuildInParameter-id. Currently I am doing it like…
Trom Till
  • 1
  • 2
0
votes
2 answers

What is Autodesk Revit's backend database structure?

Autodesk Revit has the ability to export to a relational database structure through its existing toolset. But, for Revit itself, is it structured with a non-relational database, as the API has each project being represented as a 'Document'?
mossherder
  • 135
  • 7
0
votes
1 answer

Revit FacingOrientation gives wrong orientation for Skylight

I get wrong orientation for skylight(a Window family instance) by FacingOrientation property. FacingOrientation is normally same as the GeometryInstance.Transform.BasisY but in the case of rooflight it seems that the correct orientation comes from…
ali
  • 529
  • 4
  • 26
0
votes
2 answers

Extracting Floor Area using Revit API

So far I have written C# code to allow the user to select multiple parts of a model within revit, and it will post the id of the selected elements. I now want to adapted this in two ways: 1, To check whether the element selected is a room. (has a…
D Jones
  • 55
  • 11
0
votes
1 answer

Revit API cannot run the external command

I am currently trying to create a Autodesk Revit add in, which check the geometry of a room. I am struggling to do this due to an error which says "Revit cannot run the external command. AutodeskRevit.Exceptions.InvalidOperationException. …
D Jones
  • 55
  • 11
0
votes
1 answer

Revit BoundingBoxXYZ True North

I'm getting messed up bounding boxes points only on North/South orientations when we rotate the true north in Revit. Please, has someone got the same issue? Thanks! ProjectPosition position =…
0
votes
2 answers

How to get schedule element data in revit using C#

I am new to Revit API and am working in C#. I want to get the schedule element parameters value using C#. I used the below code to get the view schedule. var viewSchedule = new FilteredElementCollector(document) …
Philip S
  • 21
  • 1
  • 7
0
votes
1 answer

Create textbox while running the program

is it possible to create a text box just like in the follow image ?
0
votes
1 answer

How to create a roof without creating walls in revit api c#

I am working on a project where I need to create a roof through code in a revit document. I have gone through the following links: https://forums.autodesk.com/t5/revit-api-forum/help-creating-roof/td-p/5828076 Creating a Roof…
JPais
  • 115
  • 2
  • 14
0
votes
0 answers

Call an Enity Framework method from Revit add-in causes NotSupportedException

I created an ADO.NET Entity Data Model using Entity Framework code-first in a RevitAddin project. public static class ElevationDao { public static int GetId(int length) { var db = new DbContext(); var obj =…