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

37 lines
3.6 KiB
Plaintext

{\rtf1\fbidis\ansi\ansicpg1252\deff0\deflang1033\deflangfe2052\deftab420{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}{\f1\froman\fprq2\fcharset0 Times New Roman;}}
{\colortbl ;\red0\green0\blue255;}
{\info{\horzdoc}{\*\lchars ([\'7b}{\*\fchars !),.:\'3b?D]\'7d}}
\viewkind4\uc1\pard\ltrpar\nowidctlpar\b\f0\fs20 Application:\b0 VisibilityControl\line\b Revit Platform:\b0 All\line\b Revit Version:\b0 2011.0\line\b First Released For:\b0 2008.0\line\b Programming Language:\b0 C#\line\b Skill Level:\b0 Medium\line\b Category:\b0 Views\line\b Type:\b0 ExternalCommand\line\line\b Subject:\b0 Control visibility by category.\line\b Summary:\b0 \line This sample demonstrates how to control visibility by category, and how the API supports the options to pick a single element or pick multiple elements.\f1\par
\f0\par
\b Classes:\b0 \f1\par
\pard\ltrpar\nowidctlpar\fi360\f0 Autodesk.Revit.DB.View\f1\par
\f0 Autodesk.Revit.Document\f1\par
\f0 Autodesk.Revit.UI.Selection\f1\par
\f0 Autodesk.Revit.DB.Document.Settings\f1\par
\f0 Autodesk.Revit.DB.Categories\f1\par
\pard\ltrpar\nowidctlpar\f0\par
\b Project Files:\b0\i \cf1\i0\f1\par
\pard\ltrpar\nowidctlpar\tx720\cf0\f0 Command.cs\par
\pard\ltrpar\nowidctlpar\li420\tx720 It contains the class Command which implements interface IExternalCommand; it is the entry of this external command.\f1\par
\pard\ltrpar\nowidctlpar\tx720\f0 VisibilityCtrl.cs\f1\par
\pard\ltrpar\nowidctlpar\li420\tx720\f0 It contains the class VisibilityCtrl which is responsible for controlling visibility by category.\f1\par
\f0 And an enumerate type IsolateMode listing the types of element select mode.\f1\par
\pard\ltrpar\nowidctlpar\f0\par
\b Description:\b0 \f1\par
\f0 Functionalities:\par
\pard\ltrpar\nowidctlpar\fi-420\li780\tx780 -\tab Control the visibility of elements in active view by category. A checked list box will allow user to choose the categories to be visible. After that, the active view will display elements belong to the checked categories, and elements belong to the unchecked categories will be invisible.\f1\par
\pard\ltrpar\nowidctlpar\fi-420\li780\f0 -\tab The user can select one element or multiple elements, and then the elements which belong to same category(s) of selected element(s) will be isolated in active view.\f1\par
\pard\ltrpar\nowidctlpar\f0 Implements:\f1\par
\pard\ltrpar\nowidctlpar\fi-420\li780\tx780\f0 -\tab The Document.Settings property provides access to general application settings of the Revit application, such as Categories. And its property Categories retrieves an object that provides access to all the categories within the Revit application and project.\f1\par
\pard\ltrpar\nowidctlpar\fi-420\li780\f0 -\tab The method setVisibility of View object can set the visibility of specified category.\f1\par
\f0 -\tab The Selection\rquote s method \lquote PickOne\rquote selects at most one element. One more element will be added to modscope if user selects an element which differs from the elements in modscope before user's pick one operation.\f1\par
\f0 -\tab The Selection\rquote s method \lquote WindowSelect\rquote selects elements by window. Elements will be added to modscope if possible.\f1\par
\pard\ltrpar\nowidctlpar\par
\f0\par
\b Instructions:\cf1\b0 \cf0\par
\pard\ltrpar\nowidctlpar\fi-360\li360\tx360 1.\tab Run Revit 2009.\par
\pard\ltrpar\nowidctlpar\fi-360\li360 2.\tab Run this external command.\par
3.\tab You can get and change the visibility of all categories in the active view.\par
4.\tab You can choose PickOne or WindowSelect mode to isolate element(s).\par
}