Files
2021-04-20 11:36:21 +02:00

32 lines
3.3 KiB
Plaintext

{\rtf1\ansi\ansicpg1252\deff0\deflang1033\deflangfe2052{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}{\f1\froman\fprq2\fcharset0 Times New Roman;}}
{\colortbl ;\red0\green0\blue255;}
{\*\generator Msftedit 5.41.21.2509;}\viewkind4\uc1\pard\nowidctlpar\b\f0\fs20 Application:\b0 PhaseSample\line\b Revit Platform:\b0 All\line\b Revit Version:\b0 2011.0\line\b First Released For:\b0 9.0\line\b Programming Language:\b0 VB.NET\line\b Skill Level:\b0 Beginning\line\b Category:\b0 Basics\line\b Type:\b0 ExternalCommand\line\line\b Subject:\b0 Filter elements by their phases.\line\b Summary:\b0 \line This sample demonstrates how to use phase to filter elements and how to highlight filtered elements by Execute method parameters.\f1\par
\f0\par
\lang1031\b Classes:\b0 \f1\par
\pard\nowidctlpar\li360\f0 Autodesk.Revit.DB.Document \f1\par
\f0 Autodesk.Revit.DB.Element \f1\par
\lang1033\f0 Autodesk.Revit.Elements.Phase \f1\par
\f0 Autodesk.Revit.UI.IExternalCommand\f1\par
\f0 Autodesk.Revit.DB.ElementSet\f1\par
\pard\nowidctlpar\f0\par
\b Project Files:\b0 \par
Command.vb\f1\par
\pard\nowidctlpar\li360\f0 This file contains the class Command which inherits from IExternalCommand. The function of it is to retrieve all the phases which belong to the current document, and then put them in a dialog with which user could select their phases to determine which elements will be highlighted.\f1\par
\par
\pard\nowidctlpar\f0 PickPhase.vb\f1\par
\pard\nowidctlpar\li360\f0 This file contains a Form class, which takes the conditions to filter the elements, user could select a phase property \ldblquote Created\rdblquote or \ldblquote Demolished\rdblquote with radio buttons then in a list box choose the phases names of elements that to be highlighted after the \ldblquote OK\rdblquote button was clicked.\f1\par
\par
\pard\nowidctlpar\b\f0 Description:\b0 \f1\par
\pard\nowidctlpar\fi-360\li360\tx360\f0 -\tab To get all the phases in a document, use Document.Phases.\f1\par
\pard\nowidctlpar\fi-360\li360\f0 -\tab To get \ldblquote Created\rdblquote and \ldblquote Demolished\rdblquote phase of an element, use Element.PhaseCreated and Element.PhaseDemolished.\f1\par
\f0 -\tab To get name of phase object, use Phase.Name.\f1\par
\pard\nowidctlpar\fi-360\li360\tx360\f0 -\tab To add an element in a set of element, use Autodesk.Revit.ElementSet.Insert(Element).\f1\par
\pard\nowidctlpar\fi-360\li360\f0 -\tab When the command returns cancelled or failed, a message will be shown and some elements will be highlighted. The message and collection of the elements which can be changed in the method IExternalCommand.Execute are the parameters of the method.\f1\par
\pard\nowidctlpar\par
\b\f0 Instructions:\cf1\b0 \f1\par
\pard\nowidctlpar\fi-360\li360\tx360\cf0\f0 1.\tab Prepare your Revit project. Draw something in your document i.e. walls, floors, and change phases for them. A sample project file PhaseSample.rvt is available in the sample\rquote s folder.\f1\par
\pard\nowidctlpar\fi-360\li360\f0 2.\tab Run the command.\par
3.\tab Select a phase property \ldblquote Created\rdblquote or \ldblquote Demolished\rdblquote to filter elements.\par
\pard\nowidctlpar\fi-360\li360\tx360 4.\tab In the list box, select the phase names of elements that to be highlighted.\f1\par
}