Author Topic: Revit API {Addin or Macro Suggestions}  (Read 2121 times)

0 Members and 1 Guest are viewing this topic.

Jeff H

  • Needs a day job
  • Posts: 6150
Revit API {Addin or Macro Suggestions}
« on: July 18, 2015, 03:26:53 PM »
Where I live Revit was starting to gain traction but it was right when the housing market crashed crippling the economy and it quickly fizzled.
I do not how it came back so quick(and wish it go the f**k back away) but we went from 1 revit job in 4 years to +40% of upcoming jobs are Revit.

So I guess I am going to start learning the Revit API, mainly to see if it make dealing with it easier.
I have some knowledge of Revit but lack the years of experience using it to know what aspects to automate would be most valuable.

So I thought you guys with more experience would suggest better ideas. I have started adding some tools and anything you can do in API can be done in the UI. So if I build something that is just as easy to do with UI it provides no value.

So Any suggestions for something you like created or automated?

The next two posts are the first two things I built and please let me know what I can add or change if it helps.

Attached at end of message is the addin which are the files that need to be copied to paths below for 2014 and 2015.
  • %appdata%\Autodesk\Revit\Addins\2014
  • %appdata%\Autodesk\Revit\Addins\2015
You can copy the paths above and paste them in top bar of windows explorer and press enter and will expand %appdata% to local user appdata path.

Jeff H

  • Needs a day job
  • Posts: 6150
Re: Revit API {Addin or Macro Suggestions}
« Reply #1 on: July 18, 2015, 03:27:10 PM »


The first thing I built was to help inspect elements and see how they are built.
I like these types of tools because you will see that 2 objects that you thought were completely different are actually composed of some of the same objects and to help see why objects act the way they do.

Since revit is sh**ty and it will be looking at sh*t  I called it  PooperSnooper
  • PooperSnooper - inspecting elements in host model
  • PooperSnooperLink -  inspecting elements in a linked model.

The forms looked really good in my imagination but really bad in reality.
So I will make forms looks better

The left side starts with Revits base object then shows the next derived class properties, etc.. until you reach the type you selected.
The right side are the parameters in its parameters set.

What you will see is everything you select in UI is a FamilyInstance.



If the property is bold you can click on it to open another form with that objects information.

Here is FamilySymbol from above



If you clicked its Family property above you will see how the Family object is related to what a family template file is.
The family class also has a FamilySymbolSet property which is a collection FamilySymbols that are the different family types you create.

The FamilySymbol object is related to the family file created from template, and a FamilyInstance object is related to a instance of a family.

This is what you see for loadable familes, vs a system family like a wall or floor.

Here is short video using it
PooperSnoop

Jeff H

  • Needs a day job
  • Posts: 6150
Re: Revit API {Addin or Macro Suggestions}
« Reply #2 on: July 18, 2015, 03:27:32 PM »
I was wanting to see all objects that were hosted by a level or its parent was hosted by level.
Using drop menu from view cube->Orient to view->Floorplans->ViewName
Still required elements to fall in between a certain height to show and I was wanting to see anything that was hosted by a level

So ended up with this which lets you create a selection or view showing only the objects that are hosted by the level or hosted by object that is hosted by level.

Selection



3D view



Filter further by phase created and phase demoed.


Here is a video using it
Levels