Monday, December 6, 2010

BIM API Explanation Video

Project 2 BIM API

For this project, I wanted to improve my parametric family from project 1. My goals were as follows:

  • Place multiple windows in a wall
  • Place a facade of my "tube panels" from project1
  • Use C# to locate the windows and place curtain wall grid lines accordingly
  • Switch panels in front of windows to a "flat tube" geometry to allow someone to look through the window and out of the facade
To achieve this, I first needed to modify my family to be able to switch between a "tube" and "flat tube". Because of the nested families, I needed to manipulate geometry 3 layers deep where the family consists of only 1 tube. To achieve this, I created a YES/NO parameter called "Void" to control which geometry is present. I then modeled both a "tube" and a "flat tube" in the same location and with identical Height and Radius constraints. The "tube" is a simple circle extrusion. The "flat tube" is the same geometry with a mirrored void that removes part of the geometry and has parameters to control the ratio of flat area to transitional area. I used a boolean operation to only allow one geometry to be shown at a time, and linked it the "Void" parameter. When this parameter is checked "yes," the voided tube is shown. 


This void parameter is passed all the the way through the nested families and then displayed as an instance parameter for each curtain wall panel in the project.


Once this was completed, I needed to set up my Revit project. I placed a generic wall with 2 windows in it, and a curtain wall 1' in front of it representing the facade/

I created a set of curtain wall grid lines bordering the windows and dimensioned them in both plan and elevation. I then used API to control the further manipulation of the grid lines. To do this I had to establish all dimensions (8 in plan and 4 in elevation) as variables, retrieve and their values. Then I had to establish the grid lines as variables and use the "Move XYZ" command to manipulate their locations. For vertical grid lines, for example, were Move XYZ( "location of window's left sash - location of grid line", 0, 0) which delivered a value of movement change equal to the difference of the previous location of the window and the new location of the window. This allows me to move the windows in any direction or change their width and height:

Then run the program to relocate the grid lines to their correct location.:


Then all I have left to do is switch ON the voids in the panels in front of windows.