Thursday, November 30, 2017

Automatic Wall Creation with the Revit API

From The Building Coder blog:

Automatic Wall Creation

By Jeremy Tammik
November 30, 2017

I highlight yet another thread from the Revit API discussion forum, on mathematical translations for automatic wall creation, with an exceedingly elegant solution by Alexander @aignatovich Ignatovich.

Alexander's macro illustrates a number of important concepts and implements the following functionality very succinctly indeed:
  • Retrieve all the cube family instances
  • Retrieve their height parameter value
  • Retrieve their solids making use of the .NET yield operator
  • Extract their horizontal outline contours using an ExtrusionAnalyzer
  • Create walls along each contour curve segment
  • Place a door family instance at the midpoint of each wall
  • His code is well worth reading in detail!

An absolute must, actually!

Cube family instances before running command

Walls and doors added along cube horizontal
contours after running command

Read more on the Building Coder blog »

No comments: