Application: DynamicModelUpdate
Revit Platform: All
Revit Version: 2012.0
First Released For: 2011.0
Programming Language: C#
Skill Level: Advanced
Category: Geometry
Type: ExternalApplication

Subject: 
Dynamic Model Update used to maintain relative position between elements

Summary: 
Move a section marker to maintain relative position with a window

Classes: 
Autodesk.Revit.DB.UpdaterRegistry
Autodesk.Revit.DB.ElementClassFilter
Autodesk.Revit.DB.ElementCategoryFilter
Autodesk.Revit.DB.LogicalAndFilter
Autodesk.Revit.DB.LocationPoint
Autodesk.Revit.DB.ExtensibleStorage.Schema
Autodesk.Revit.DB.ExtensibleStorage.SchemaBuilder
Autodesk.Revit.DB.ExtensibleStorage.Field
Autodesk.Revit.DB.ExtensibleStorage.FieldBuilder
Autodesk.Revit.DB.ExtensibleStorage.Entity

Project Files:
Application.cs

Description:
1.	During Revit start-up
a.	Register the SectionUpdater class
b.	Add a trigger so that the SectionUpdater class will be invoked for any geometry change to a window
2.	When the geometry of a window changes
a.	Move the section marker (hard-coded in the sample with its ID) to a new location based on the distance that the window moved in the X, Y, and Z directions. (In Revit 2012, these values are stored using extensible storage in the window element)
b.	Update the values of the window’s X, Y, and Z parameters based on the location point of the window

Instructions: 
1.	Open AssociativeSection.rvt
2.	Move the window or the wall
3.	Revit will move the section marker so that the window and section maintain their initial relative position.