Description
-----------
This sample demonstrates the "Associative Draft View" functionality of Inventor. This is functionality supported by the API that allows you to draw your own representation of a model. When an associative draft view is created an empty view is created that has a sketch associated with it. You draw the representation of the model as sketch geometry in the sketch. There is also an event on the view that notifies you if the model has been changed so you can update the contents of the view.

To support the ability to update the drawing, this sample relies heavily on attributes to be able to know which rectangular shape in the drawing is associated with which occurrence in the assembly.

Instructions
------------
To run the demo, have an assembly open. I have the LayoutSample assembly packaged along with this sample that can be used, but any assembly will work. With that assembly active, run the sample exe and click the "Create Drawing" button. This will create a new drawing where the range box of each occurrence in the top-level of the drawing is shown as a filled rectange and the name of the occurrence is in each box. The view is looking down on the X-Y plane.

Running the "Create Drawing" command, also starts listening to the event to know when the assembly changed. Because of that, you can switch back to the assemlby and move any occurrence and them switch back to the drawing and it will updated.

If you close the drawing, the event is disconnected. Open the drawing and click the "Connect Events" button to reconnect to the event so it will update automatically when the assembly is modified. You can also use the "Do Update" button to force a manual update.

