Application: SpotDimension
Revit Platform: All
Revit Version: 2011.0
First Released For: 2008.0
Programming Language: C#
Skill Level: Beginning
Category: Annotation
Type: ExternalCommand

Subject: Display Spot Dimensions.
Summary: 
This sample demonstrates how to retrieve all the spot dimensions and theirs properties in all views of Revit document.

Classes: 
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.DB.SpotDimension
Autodesk.Revit.DB.Parameter

Project Files:

SpotDimensionsData.cs
This file contains the functions that how to get all the spot dimensions.

SpotDimensionParams.cs
This file contains the function that how to get a spot dimension’s properties.

Description:
-	Get spot dimensions in all views. All the spot dimensions can be retrieved by scanning Elements of Document.
-	There is a dialog to show these spot dimensions according to its View property and some information of them.
-	If one spot dimension was selected in dialog when return to Revit, it can be highlighted.
-	Classify spot dimension according to its View property. Spot dimensions in same view will be displayed together.
-	Select view from a list, and then spot dimensions in it are displayed.
-	Select spot dimension from a list, then some of its parameters are displayed.
-	Parameters can be got via DimensionType.get_Parameter() and some properties of the SpotDimension Class.

Instructions: 
1.	First draw an element (for example a wall), and then draw some spot dimensions with Revit Menu Command: Drafting->Spot Dimension tool in Revit UI.
2.	Load and run the SpotDimension.dll.
3.	Select a view to show all the spot dimensions in that selected view. And then select a spot dimension to show its properties in a DataGridView at the bottom of the dialog.
4.	Select a spot dimension, and then close the dialog to return Revit, then the spot dimension will be highlighted afterwards.