Files
2024-12-12 09:51:40 +01:00

40 lines
3.1 KiB
Plaintext

{\rtf1\fbidis\ansi\ansicpg1252\deff0\deflang1033\deflangfe1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}}
\viewkind4\uc1\pard\ltrpar\nowidctlpar\b\f0\fs20 Application:\b0 FindColumns\line\b Revit Platform:\b0 All\line\b Revit Version:\b0 2011.0\line\b First Released For:\b0 2011.0\line\b Programming Language:\b0 C#\line\b Skill Level:\b0 Advanced\line\b Category:\b0 Geometry\line\b Type:\b0 ExternalCommand\par
\b\par
Subject: \b0 Columns Embedded in Walls\b\par
Summary: \par
\b0 This sample shows how to find columns that are embedded in walls with the Revit API method FindReferencesByDirection.\par
\b\par
Classes: \par
\b0 Autodesk.Revit.DB.FilteredElementCollector\par
Autodesk.Revit.DB.FilteredElementIterator\par
Autodesk.Revit.DB.Transform\par
Autodesk.Revit.DB.XYZ\par
Autodesk.Revit.DB.Document\par
Autodesk.Revit.UI.Selection.Selection\b\par
\par
Project Files:\b0 \par
FindColumns.cs\par
\par
\b Description:\b0 \par
\pard\ltrpar\nowidctlpar\fi-360\li720 1.\tab Determine which walls to process (either the selected walls, or all walls if none are selected)\par
2.\tab Find columns embedded in each wall\par
\pard\ltrpar\nowidctlpar\fi-360\li1440 a.\tab For linear walls\par
\pard\ltrpar\nowidctlpar\fi-180\li2160 i.\tab Set the height for the ray at 1\rquote above the wall\rquote s level\par
ii.\tab Find the direction tangent to the wall\rquote s location curve\par
iii.\tab Because the wall\rquote s LocationCurve is always the wall centerline, use the wall\rquote s width to determine the offset needed for FindReferencesByDirection to shoot its \ldblquote ray\rdblquote just outside of the wall\par
iv.\tab Find references of objects returned by FindReferencesByDirection when running from one end of the wall to the other end of the wall\par
v.\tab Check each reference to validate that it is a column within the allowable distance from the origin used with FindReferencesByDirection (don\rquote t want columns past the end of the wall)\par
\pard\ltrpar\nowidctlpar\fi-360\li1440 b.\tab For non-linear walls\par
\pard\ltrpar\nowidctlpar\fi-180\li2160 i.\tab Unlike linear walls, where a single ray can be to check for intersections along the entire length of the wall, a non-linear wall must be divided into series of smaller pieces to approximate the wall as a set of shorter straight segments.\par
ii.\tab Calculate an increment that will be used for the length of these short segments\par
iii.\tab Check for columns along every incremental piece of the wall using the methodology described above for linear walls.\par
\pard\ltrpar\nowidctlpar\fi-360\li1440 c.\tab Select the resulting columns\par
\pard\ltrpar\nowidctlpar\par
\b Instructions:\par
\pard\ltrpar\nowidctlpar\fi-360\li720\b0 1.\tab Open the file FindColumns-Basic.rvt or FindColumns-TestCases.rvt\par
2.\tab Run the external command \ldblquote Find Columns Embedded in Walls\rdblquote\par
3.\tab If one or more walls are selected before running the command, Revit will select the columns embedded in the selected walls.\par
4.\tab If no walls are selected before running the command, Revit will select all columns that are embedded in a wall.\par
}