Application: InPlaceMembers
Revit product and version: Revit Structure 2008
Last Modified: 12/12/2006
Modified By: VL Autodesk HSL
Programming Language: C#

Subject: This sample demonstrates how to get the In-place Family instance and its properties in the current document of Revit.

Classes: 
Autodesk.Revit.IExternalCommand 
Autodesk.Revit.Elements.FamilyInstance
Autodesk.Revit.Structural.AnalyticalModel
Autodesk.Revit.Geometry.Curve

Project Files: 
Command.cs
This file contains a class Command that implements the IExternalCommand, the function of this class is to Retrieve values of an In-place Family instance’s properties and send the data to UI.

GraphicsData.cs
This file contains a class GraphicsData, the function of this class is to store the AnalyticalModel’s curve points and implements some functionality to operate the Geometry: such as Rotate, Move, etc.

GraphicsDataFactory.cs
This file contains a class GraphicsDataFactory. The class just has a static method CreateGraphicsData to create a GraphicsData object.

PictureBox3D.cs
This file contains a class PictureBox3D, the functionality of this class is to paint the geometry curves of the analytical model contained in a GraphicsData object.

Properties.cs
This file contains a class Properties, this class stores all the properties’ values of FamilyInstance object.
	
InPlaceMembersForm.cs
This file contains a class InPlaceMembersForm, the class inherits from Form and ImessageFilter. It uses a PictureBox3D to paint the analytical model’s curves and a PropertyGrid to show the properties of selected FamilyInstance.

Description:
This sample retrieves the properties’ values of an In-place FamilyInstance, paints the analytical model of FamilyInstance in a PictureBox and shows other properties in a Property Grid. We can get the AnalyticalModel’s profile via Curves property.
	
Instructions: 
1.	Create an in-place FamilyInstance has AnalyticalModel and select it.
2.	Run the command.
3.	The Form will show the AnalyticalModel of the selected FamilyInstance. The geometry can be rotated, moved and scaled via keys: 
-    Rotate (Left, Right, Up, Down, PageUp, PageDown)
-    Move (S, W, A, D) 
-    Scale (Home, End).