Sunday, September 29, 2019

The Revit API Introduction

Revit API Introduction:

Revit API provides access to properties, methods, interfaces to interact with Revit Elements.
How one can start using Revit API?

Motivation:

There are many resources out there that will give enough pointers to how to perform a specific task
using API. These posts only describe how to get started with using API.

There are lots of processes that can be accessed using API and can help you automate certain repetitive work. So, the main motivation of using API according to me is to automate most of these repetitive work. I have worked on such products. I extensively work with automation and optimization of Revit Models. The results were really effective and yes like many other products, they can still optimized to much more detail if followed some standards while designing a BIM model.

Getting Started:

1. To get started with Revit API, Autodesk provides Revit SDK that could be a really great resource to start with. But again for using API, everything boils down to basics of Revit and to know how Revit determines, differentiate between different elements in Revit document.
First thing I would suggest to use Revit, build  few walls, insert some family.

2. Once you get familiar with the Revit application. Install Revit Lookup, a much-needed piece for developers. Select any element in Revit Model and use Revit Lookup. It will give you geometric data,
location, rotation, category, family symbol, family and other information of selected element.
Read about family symbols, familyInstance, family, category. Try drawing a bounding box on paper obtained from the lookup.

3. Let's start with a simple hello world application/command.

4. The next step would be, get some simple Revit Model to play around.

  • Get a selection of an element from the Revit Model in API, extract information such as geometric data.
  • Geometric data includes the bounding box, faces, edges, etc. Get the location of the element. There can be different types of placement types of an element such as point-based, line/curve based, level-based, etc.
  • This information can be explored from Revit Lookup, and according to that API can be used to extract such information.
  • A quick background of Revit Lookup, read Revit LookUp post.
  • Explore Family, FamilySymbol/type information from lookup and then from API. Understand the hierarchy of Revit elements.

5. Once you get comfortable with RevitAPi, start using model lines for a task like marking geometric data or position. Draw bounding, edges, faces of an element. These will help in understanding geometry. Write a plugin for checking intersecting walls, check parallelity of two walls, translate, rotate wall about a point by certain degrees.

6. Create a simple family in Revit. Create Instance, Type parameters. Access these parameters in API, reset their values.
See the difference between :
***1 what happens when a family instance with Instance parameter when resetting its value, what happens?
 ***2 when the type parameter value is reset then what happens?
Create Shared parameters.

7. User Revits ControlledApplication Events, Idling Events, IUpdater, IFailuerProcessor, FailuerProcessingEvent, etc.

8. Load families, create Family symbols, create Family instances,

9. Create Views (iso, front, top), ViewSheet, ViewSchedules, etc
Create dimension, place annotation elements on view sheets

10. Create Assemblies







Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home