{\rtf1\fbidis\ansi\ansicpg1252\deff0\deflang1033\deflangfe1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Calibri;}{\f1\froman\fprq2\fcharset0 Times New Roman;}} \viewkind4\uc1\pard\ltrpar\nowidctlpar\b\f0\fs20 Application:\b0 MeasureHeight\f1\line\b\f0 Revit Platform:\b0 All\line\b Revit Version:\b0 2011.0\line\b First Released For:\b0 2011\f1 .0\line\b\f0 Programming Language:\b0 C#\line\b Skill Level:\b0 Medium\line\b Category:\b0 Geometry\line\b Type:\b0 ExternalCommand\par \b\f1\par \f0 Subject: \b0 Measure height of skylight window\b\f1\par \f0 Summary: \par \b0 This sample shows how to find the height of a skylight window above the ground level using the Revit API method FindReferencesByDirection.\f1\par \b\par \f0 Classes: \f1\par \b0\f0 Autodesk.Revit.DB\f1 .\f0 FilteredElementCollector\par Autodesk.Revit.DB\f1 .\f0 FamilyInstance\par Autodesk.Revit.DB\f1 .\f0 ModelCurve\par Autodesk.Revit.DB\f1 .\f0 BoundingBoxXYZ\par Autodesk.Revit.DB\f1 .\f0 Document\par Autodesk.Revit.UI.Selection\f1 .\f0 Selection\b\f1\par \par \f0 Project Files:\b0 \par \pard\ltrpar\nowidctlpar\li360 MeasureHeight.cs\f1\par \pard\ltrpar\nowidctlpar\par \b\f0 Description:\b0 \par \pard\ltrpar\nowidctlpar\fi-360\li720 1.\tab Find a 3D view to use with FindReferencesByDirection\f1\par \f0 2.\tab Check if a roof-hosted window is selected\f1\par \f0 3.\tab Calculate the window\rquote s height above a floor (the floor\rquote s ID is hard-coded in this sample)\par 4.\tab Use the center of the window\rquote s bounding box as the start point for FindReferencesByDirection\par 5.\tab Run FindReferencesByDirection using the negative Z direction\par 6.\tab Find the closest reference that belongs to the floor\par 7.\tab Create a model curve to show the \ldblquote ray\rdblquote found by FindReferencesByDirection\par \pard\ltrpar\nowidctlpar\f1\par \b\f0 Instructions:\f1\par \pard\ltrpar\nowidctlpar\fi-360\li720\b0\f0 1.\tab Open MeasureSkylightHeight.rvt\f1\par \f0 2.\tab Select the skylight window\par 3.\tab Run the external command\par 4.\tab A task dialog will report the window\rquote s height and a line is created to show where the distance was measured\f1\par }