© 2010 Autodesk
Introduction to Revit 2011 API
Lab - Events
§
§
     //' you can get the list of ids of element added/changed/modified.
     Document rvtdDoc = args.GetDocument();
     ICollection<ElementId> idsAdded = args.GetAddedElementIds();
     ICollection<ElementId> idsDeleted = args.GetDeletedElementIds();
     ICollection<ElementId> idsModified = args.GetModifiedElementIds();
     //' put it in a string to show to the user.
     string msg = "Added: ";
     foreach (ElementId id in idsAdded)
     {
         msg += id.IntegerValue.ToString() + " ";
      }
     //' register the document changed event
     application.ControlledApplication.DocumentChanged += UILabs_DocumentChanged;