mirror of
https://github.com/jeremytammik/RevitSdkSamples.git
synced 2026-08-09 06:31:32 +00:00
54 lines
5.3 KiB
Plaintext
54 lines
5.3 KiB
Plaintext
{\rtf1\fbidis\ansi\ansicpg1252\deff0\deflang1033\deflangfe2052{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}{\f1\froman\fprq2\fcharset0 Times New Roman;}}
|
|
{\colortbl ;\red0\green0\blue255;}
|
|
\viewkind4\uc1\pard\ltrpar\nowidctlpar\b\f0\fs20 Application:\b0 AddSpaceAndZone\line\b Revit Platform:\b0 MEP\line\b Revit Version:\b0 2011.0\line\b First Released For:\b0 2009.0\line\b Programming Language:\b0 C#\line\b Skill Level:\b0 Medium\line\b Category:\b0 Rooms/Spaces\line\b Type:\b0 ExternalCommand\line\line\b Subject:\b0 Create spaces and zones.\line\b Summary:\b0 \line This sample demonstrates three main features:\par
|
|
\pard\ltrpar\nowidctlpar\fi-360\li1440\tx1440 1.\tab How to get all Space elements in a specified level.\par
|
|
\pard\ltrpar\nowidctlpar\fi-360\li1440 2.\tab How to get all Zone elements in a specified level.\par
|
|
3.\tab How to create Space elements for each closed wall loop or closed space separation.\f1\par
|
|
\f0 4.\tab How to create a new Zone element in a specified level and phase.\par
|
|
5.\tab How to add/remove spaces in a Zone element.\par
|
|
\pard\ltrpar\nowidctlpar\par
|
|
\b Classes:\b0 \par
|
|
\pard\ltrpar\nowidctlpar\fi360 Autodesk.Revit.UI.IExternalCommand\f1\par
|
|
\f0 Autodesk.Revit.DB.Mechanical.Space \par
|
|
Autodesk.Revit.DB.Mechanical.Zone\par
|
|
Autodesk.Revit.DB.Phase\par
|
|
Autodesk.Revit.Creation.Document\par
|
|
\f1\par
|
|
\pard\ltrpar\nowidctlpar\f0\par
|
|
\b Project Files:\b0 \par
|
|
Command.cs\par
|
|
\pard\ltrpar\nowidctlpar\li360\tx720 This file contains the class \ldblquote Command\rdblquote which inherits from \ldblquote IExternalCommand\rdblquote interface and implements the \ldblquote Execute\rdblquote method.\par
|
|
\pard\ltrpar\nowidctlpar\fi240\par
|
|
\pard\ltrpar\nowidctlpar DataManager.cs\f1\par
|
|
\pard\ltrpar\nowidctlpar\li360\tx720\f0 It contains a class named \ldblquote DataManager\rdblquote which is used to obtain, create or edit the Space elements and Zone elements.\f1\par
|
|
\par
|
|
\pard\ltrpar\nowidctlpar\f0 SpaceManager.cs\f1\par
|
|
\pard\ltrpar\nowidctlpar\li360\tx720\f0 It contains a class named \ldblquote SpaceManager\rdblquote which is used to manage the Space elements in the current document. It can create Space elements for each closed wall loop or closed space separation.\par
|
|
\f1\par
|
|
\pard\ltrpar\nowidctlpar\f0 ZoneManager.cs\f1\par
|
|
\pard\ltrpar\nowidctlpar\li360\tx720\f0 It contains a class named \ldblquote ZoneManager\rdblquote which is used to manage the Zone elements in the current document. It can add/remove spaces in a Zone element.\par
|
|
\par
|
|
\pard\ltrpar\nowidctlpar\b Description:\b0 \par
|
|
Functionalities:\par
|
|
\pard\ltrpar\nowidctlpar\fi-360\li360\tx360 -\tab Get all Space elements and Zone elements in active document and list them grouped by level.\f1\par
|
|
\pard\ltrpar\nowidctlpar\fi-360\li360\f0 -\tab Create Space elements for each closed wall loop or closed space separation in a specified level.\f1\par
|
|
\f0 -\tab Create a new Zone element in a specified level and phase\f1 .\par
|
|
\f0 -\tab Add/remove spaces in a Zone element\f1\par
|
|
\pard\ltrpar\nowidctlpar\par
|
|
\f0 Implementations:\f1\par
|
|
\pard\ltrpar\nowidctlpar\fi-360\li360\tx360\f0 -\tab Using Element Filter to get all Space and Zone elements.\par
|
|
\pard\ltrpar\nowidctlpar\fi-360\li360 -\tab Create spaces for each closed wall loop or closed space separation via ElementSet NewSpaces (Level level, Phase phase, View view) method\f1 .\par
|
|
\f0 -\tab Create spaces for each closed wall loop or closed space separation via ElementSet NewSpaces (Level level, Phase phase, View view) method\f1 .\par
|
|
\f0 -\tab Add/Remove spaces in a zone via bool AddSpaces (SpaceSet spaces)/Remove (SpaceSet spaces) member functions of Zone class.\par
|
|
\pard\ltrpar\nowidctlpar\li360\par
|
|
\pard\ltrpar\nowidctlpar\b Instructions:\cf1\b0 \cf0\par
|
|
\pard\ltrpar\nowidctlpar\fi-360\li360\tx360 1.\tab Open a Revit MEP 2009 file which contains some enclosed loops which are made up of walls. A sample project file WallLoopForAddingSpaceAndZone.rvt is available in the sample\rquote s folder.\par
|
|
\pard\ltrpar\nowidctlpar\fi-360\li360 2.\tab Run this command.\par
|
|
3.\tab An AddSpaceAndZone dialog will be shown to display all the Space and Zone elements filtered by level. The Spaces will be displayed as a list in the Spaces Tag page, the Zones will be displayed as a tree list to show the spaces each Zone element contains.\par
|
|
4.\tab Click \ldblquote Create Spaces\rdblquote button in Space Tag page to create spaces for each closed wall loop or closed space separation in the selected level\f1 .\f0\par
|
|
5.\tab Click \ldblquote Create Zone\rdblquote button in Zones Tag page to create a zone in a current level and phase of the active view\par
|
|
6.\tab Select a Zone, click the \ldblquote Edit Zone\rdblquote button, a ZoneEditorForm will be shown to display the available spaces list and the spaces the selected zone contains in current level. Select some spaces in the available spaces list, click the \ldblquote Add\rdblquote button to add them to the current Zone. Select some spaces in the current spaces list, click the \ldblquote Remove\rdblquote button to remove them from the current Zone. Click the \ldblquote OK\rdblquote button to return the AddSpaceAndZone dialog.\par
|
|
7.\tab Click \ldblquote OK\rdblquote button to accept the operation or click \ldblquote Cancel\rdblquote button to abort them.\par
|
|
\pard\ltrpar\nowidctlpar\f1\fs24\par
|
|
}
|
|
|