Maciej Główka
Blog Games Contact
revit api dynamo machine learning generative python blender javascript webdev rust bevy gamedev android
Aug. 8, 2019

Creating elevation views with API

Creating section views at given location and direction with Revit API is relatively easy. You just have to create a right Bounding Box (it’s dimensions and transformation) and pass it as a constructor function parameter. Unfortunately it is not so easy with elevation views.The elevation views in Revit are not independent – they have to belong to a specific elevation marker. Therefore the vie…
May 24, 2019

Finding element location by using Bounding Box in Dynamo

Most of the times Revit element location can be easily found in Dynamo with a help of some standard nodes – such as FamilyInstance.Location. There are some element categories however, that can cause a bit of a problem. For instance walls will return their location as a curve rather than a point. Elements that are generated by a sketched boundary (eg. floors) will not return a location at all. If …
May 10, 2019

Room boundaries from linked documents

Generating room boundaries with Python is relatively easy. It can be done by using following API call: loops = room.GetBoundarySegments(options) Options is a variable of SpatialElementBoundaryOptions type, which states desired boundary line location, eg. for walls it can be a finish line or centreline. As a result of the above we receive a list of loops, where each loop is a list itself…
March 29, 2019

Resetting MEP systems overrides

Revit MEP models allow overriding graphical display of entire MEP systems. It can be problematic when linking such models to eg. architecture. Often we would like to adjust visibility settings of MEP elements, but it cannot be done because of those overrides. Their priority is higher then view templates or filters.A solution for that is removing those overrides for every system separately, …
Feb. 12, 2019

Dimensioning elements from linked files with Dynamo

In one of the previous posts I have shown how to dimension curtain walls with Dynamo and Python. A thread on the Dynamo Forum made me realize that it will not work in case of elements coming from linked documents.In order to create a new dimension line by script in Revit we have to prepare first a reference array – a list of references to all the objects we want to dimension. According to Revit A…
Jan. 30, 2019

Auto-joining floors and walls

When modelling, Revit automatically joins geometries of intersecting walls – making drafting process a lot faster. It does not happen however for wall and floor pairs. Which results in some extra work while creating sections and can cause errors in schedules. Fortunately it can be easily automated by using Revit API.At the beginning we have to find all the walls and floors (separately) in the mod…
Jan. 9, 2019

Curtain wall dimensions with API and Dynamo

In this post I want to show a method that allows to automatically dimension curtain walls in Revit, with the result as on an image above.First let’s assume that our input data are: a curtain wall, a line specifying location of the future dimension line and a view. In order to create a new dimension line in Revit we use such code: doc.Create.NewDimension(view,line,refArray); Where “doc” is ou…
Dec. 7, 2018

Removing not placed rooms with Dynamo

As it is probably well known for everybody using Revit that rooms removed from model are still kept within the file as “not placed”. In order to delete them completely we have to create a schedule that would filter them for us. It is not a very tedious process, however still can be simplified by using Dynamo :) This is what such a schedule might look like. We can see that for not placed rooms th…
Nov. 13, 2018

Disabling underlays with Dynamo

Today a short post about setting multiple (or all) view underlays to none. It can save us loads of time as usually we have to do it each time we export or print drawings. Unfortunately setting underlays to ‘none’ has to be done manually for each plan view.One thing that can help us with that is a Dynamo addon, which is great for simple and repetitive tasks. By using it we can take all the plan vi…
Jan. 30, 2018

Finding mirrored elements

Sometimes it is essential in Revit to make sure that no instances of specific families are mirrored in our model. For instance when their direction is recognized in a schedule (eg. door handling). Below I want to show an example of a macro locating every door object in the model that has been mirrored – either by using a mirror command or flip arrows.First we need access our active document:Docum…
← newer older →