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

39 lines
3.8 KiB
Plaintext

{\rtf1\fbidis\ansi\ansicpg936\deff0\deflang1033\deflangfe2052{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}{\f1\froman\fprq2\fcharset0 Times New Roman;}}
{\colortbl ;\red0\green0\blue255;}
\viewkind4\uc1\pard\ltrpar\b\f0\fs20 Application:\b0 Rooms\line\b Revit Platform:\b0 Architecture\line\b Revit Version:\b0 2010.0\line\b First Released For:\b0 9.1\line\b Last Modified:\b0 02/26/2008\line\b Modified By:\b0 JJ Autodesk\line\b Programming Language:\b0 C#\line\b Skill Level:\b0 Beginning\line\b Category:\b0 Rooms/Spaces\line\b Type:\b0 ExternalCommand\line\line\b Subject:\b0 Room data retrieval and modifitcation.\line\b Summary:\b0 \line This sample demonstrates how to get Room\rquote s information (Number, Area, Department, etc), add room tags and change Room numbers.\f1\par
\f0\par
\b Classes:\b0 \f1\par
\pard\ltrpar\fi360\f0 Autodesk.Revit.IExternalCommand\f1\par
\f0 Autodesk.Revit.Creation.Document\f1\par
\f0 Autodesk.Revit.Elements.Room\par
Autodesk.Revit.Elements.RoomTag\par
Autodesk.Revit.Parameters.BuiltInParameter\f1\par
\pard\ltrpar\f0\par
\b Project Files:\b0 \par
Command.cs\f1\par
\pard\ltrpar\li360\tx720\f0 This file contains the class Command which inherits from IExternalCommand interface and implements the Execute method.\f1\par
\pard\ltrpar\f0\par
RoomsData.cs\f1\par
\pard\ltrpar\li360\tx720\f0 This class defines a data class for implementing all the functionalities of this sample, such as: get Room\rquote s information (Area, Department, etc), add Room Tags, change Room Number and so on\f1 .\par
\pard\ltrpar\par
\f0 RoomInfoForm.cs\f1\par
\pard\ltrpar\li360\tx720\f0 This file contains a Form class which consists of two ListView controls: one is for showing the Number, Area, and Department information of Rooms, the other one is for showing the total Area of different Room Departments.\f1\par
\pard\ltrpar\par
\b\f0 Description:\b0 \par
This sample uses Rooms and Creation classes mostly to implement the functionality: get Room\rquote s information (Number, Department, Tags, etc)\f1 ,\f0 add Tags to Room and change Room\rquote s number.\f1\par
\pard\ltrpar\fi-360\li360\tx360\f0 -\tab Room objects can be gotten via ActiveDocument.Elements property\f1 .\par
\pard\ltrpar\fi-360\li360\f0 -\tab To add Tags for Room, use Document.Create.NewRoomTag method\f1 .\par
\f0 -\tab To get department and area of Room, use BuiltInParameter.ROOM_DEPARTMENT and BuiltInParameter.ROOM_AREA as parameters for Room.get_Parameter() methods\f1 .\par
\f0 -\tab Number property of Room can be used to get/set the Room\rquote s Number.\f1\par
\pard\ltrpar\par
\b\f0 Instructions:\cf1\b0 \f1\par
\pard\ltrpar\fi-360\li360\tx360\cf0\f0 1.\tab Draw some Walls and Rooms in Revit firstly (you can define different Departments for Rooms or delete some Rooms\rquote tags for the following steps).\f1\par
\pard\ltrpar\fi-360\li360\f0 2.\tab Click the extern command, the Rooms Information form will be popped up: information (Name, Number, Department, etc) of all Rooms will be listed in upper ListView control, the lower ListView control will list toatal areas for different Departments.\f1\par
\f0 3.\tab Click \ldblquote Add Tags\rdblquote button to add tags for the Rooms which don\rquote t have Tags.\f1\par
\f0 4.\tab Click the \ldblquote Reorder\rdblquote button\f1 ,\f0 the Numbers of all Rooms will be sorted by ascending order according to Room\rquote s Location coordinate value (first is Z, next is X, the last is Y)\f1 .\par
\pard\ltrpar\fi-360\li360\tx360\f0 5.\tab Click \ldblquote Export\rdblquote button to export the Department summary Area to a .csv file.\f1\par
\pard\ltrpar\par
\b\f0 Notes:\cf1\b0 \f1\par
\cf0\f0 Because we need location of room when adding tag, this sample will skip those rooms which don\rquote t locate at level yet (Room.Location property is null for those rooms).\f1\par
}