Application: Unit
REXSDK Version: 2018.0
First Released For: REXSDK 2012
Last Modified: 01/07/2016
Modified By: Autodesk
Programming Language: C#
Skill Level: Easy

Subject: Show how to use REX unit features.

Summary: 
This sample demonstrates how to read input data from UI according display Unit, how to convert them to Extensions Unit and to Revit API units. 

REXSDK values: 
-	Read data from UI using Rex controls 
-	Understand the differences between, base, Interface and display units.

Project Files: 

Generated by the wizard:

Extension.cs:
The main class generated by the wizard. It contains definition of the Extension class which is the main class in the REXExtension module. This class is a central point which allows user to manage and customize the module.

ExtensionRevit.cs:
This file contains an ExtensionRevit class. This class allows to separate general functionality (provided by the Extension class) from functionality characteristic for the Revit context e.g. setting layouts may be done in the Extension class but reading Revit elements should be carried out in the ExtensionRevit class. 

Data.cs
This file contains a Data class which is a data container accessible from different places in the module. All common objects should be placed in this class.

Application.cs, DirectAccess.cs, Results.cs
These files were generated by the wizard but there is no need to make any changes in their content.

Subcontrol.cs
	This file contains a SubControl generated by the wizard. This sub control hosts 3 REX EditBoxes initialized on the constructor and 6 classical EditBoxes updated when REX controls are changed.         

Description: 
This sample shows how to register some REXEditBox to use the Extensions unit engine and demonstrate how to use base and interface units.      
  
Instructions: 
1.	Copy the module to the …Modules/Category directory
2.	Open Revit.
3.	Run the Extension.
4.	On the first column, values could be changed.  
5.	On the second column, values are displayed according Extension base units 
6.	On the third column, values are displayed according Revit API unit