DynamoDS/Dynamo — pull request #1959 by ikeough (2014-07-16 07:45:20+00:00)
Title: Selection Update

This pull request adds an UpdateDelegate to multiple element selection nodes for Revit. The update delegate is called whenever the "target object" is modified in Revit. For example, previously when you select a Divided Surface using SelectDividedSurfaceFamilies, the node found all family instances attached to the divided surface. If you changed the UV divisions of the Divided surface, the collection of families would not update because the logic for finding the family instances was inside the method for doing the selection.

The UpdateDelegate also has an out parameter which conveys the selectionTarget back to the calling method. The selection target, in the case of something like SelectDividedSurfaceFamilies would be the divided surface. A reference to this element is required for future calls to update the divided surfaces.

The PR also adds some invalid object checks on watch so elements that are no longer valid in the Revit DB aren't processed for watching.

@steel PTAL.