Find Last Type of Family Inserted

Find Last Type of Family Inserted

Anonymous
Not applicable
248 Views
2 Replies
Message 1 of 3

Find Last Type of Family Inserted

Anonymous
Not applicable

Is there any way in the Revit API that I could keep track of the most recently inserted FamilySymbol from a specific Family?

0 Likes
249 Views
2 Replies
Replies (2)
Message 2 of 3

ollikat
Collaborator
Collaborator

Hi

I can't recall any native mechanism in Revit API that would offer you this. But here's some high level thoughs for you...

 

First of all, you could have externall application allowing you to store data/state during the Revit session.

In addition you could monitor new elements with so called Dynamic Model Updater feature in API. If you recognize a new element created as a ElelementType (or FamilySymbol) then you could store desired information into your own data structure in application level.

 

If you need to keep track of additions between different Revit sessions, then you obviously need some file etc. to store this data / state.

See these interfaces in API:

IUpdater

IExternalApplication

0 Likes
Message 3 of 3

jeremytammik
Autodesk
Autodesk

You can also track new element addition using the DocumentChanged event:

 

http://thebuildingcoder.typepad.com/blog/2012/06/documentchanged-versus-dynamic-model-updater.html

 

It is simpler than the dynamic model updater DMU framework.

 

Look at the DocumentChanged SDK sample as well.

 

Cheers,

 

Jeremy

 

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes