Is there any way in the Revit API that I could keep track of the most recently inserted FamilySymbol from a specific Family?
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
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