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

30 lines
2.7 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 LevelsProperty\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 C#\line\b Skill Level:\b0 Beginning\line\b Category:\b0 Elements\line\b Type:\b0 ExternalCommand\line\line\b Subject:\b0 Display and Create Levels.\line\b Summary:\b0 \line This sample demonstrates how to get all the levels in a document, and how to create or delete a level and set its properties.\f1\par
\b\par
\f0 Classes:\b0 \par
\pard\ltrpar\nowidctlpar\fi360 Autodesk.Revit.UI.IExternalCommand\f1\par
\f0 Autodesk.Revit.DB.Level\f1\par
\f0 Autodesk.Revit.Creation.Document\f1\par
\pard\ltrpar\nowidctlpar\fi361\b\par
\pard\ltrpar\nowidctlpar\f0 Project Files:\cf1\b0\par
\cf0 Command.cs\f1\par
\pard\ltrpar\nowidctlpar\li360\f0 This file contains the functions that how to get all the levels in a Revit file, how to create a level and set its properties and implement the IExternalCommand interface\f1 .\par
\pard\ltrpar\nowidctlpar\par
\f0 LevelsDataSource.cs\par
\pard\ltrpar\nowidctlpar\fi360 This file contains the LevelsDataSource Class which used to store the data of a level in Revit.\f1\par
\pard\ltrpar\nowidctlpar\fi240\f0\par
\pard\ltrpar\nowidctlpar\b Description:\b0 \par
\pard\ltrpar\nowidctlpar\fi-360\li360\tx360 -\tab Display a list of all Levels in the current document, with their name and elevation. All the levels can be found by iterating through the current document elements.\par
\pard\ltrpar\nowidctlpar\fi-360\li360 -\tab Create a new level with a unique name and an elevation. A new level can be created by using the NewLevel method which belongs to the Autodesk.Revit.Creation.Document Class.\par
-\tab Delete a level.\par
-\tab A level\rquote s name and elevation can be set by the Name and Elevation property in the Autodesk.Revit.DB.Level Class. The name of a Level should be unique.\par
\pard\ltrpar\nowidctlpar\par
\b Instructions:\cf1\b0 \cf0\par
\pard\ltrpar\nowidctlpar\fi-360\li360\tx360 1.\tab Open a Revit document which contains some levels.\par
\pard\ltrpar\nowidctlpar\fi-360\li360 2.\tab Run the sample\f1 ,\f0 it will get all levels in current document.\par
3.\tab Click the Add button to create a new level.\par
4.\tab Selected a level in the list to set its name and elevation, click Ok button to finish set.\par
5.\tab Click the Delete button to delete a selected level in the list, click Ok button to finish it\f1 .\f0\par
}