Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Find Last Type of Family Inserted

2 REPLIES 2
Reply
Message 1 of 3
drdanielfc
187 Views, 2 Replies

Find Last Type of Family Inserted

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

2 REPLIES 2
Message 2 of 3
ollikat
in reply to: drdanielfc

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

Message 3 of 3
jeremytammik
in reply to: drdanielfc

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community