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

29 lines
2.5 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 ParameterUtils\line\b Revit Platform:\b0 All\line\b Revit Version:\b0 2011.0\line\b First Released For:\b0 8.1\line\b Programming Language:\b0 C#\line\b Skill Level:\b0 Beginning\line\b Category:\b0 Parameters\line\b Type:\b0 ExternalCommand\line\line\b Subject:\b0 Display parameters.\line\b Summary:\b0 \line This sample demonstrates how to get the parameters of a Revit element.\f1\par
\f0\par
\b Classes:\b0 \f1\par
\pard\nowidctlpar\li360\f0 Autodesk.Revit.DB.Element \f1\par
\f0 Autodesk.Revit.DB.Parameter\f1\par
\f0 Autodesk.Revit.DB.Document\f1\par
\pard\nowidctlpar\f0\par
\b Project Files:\b0 \par
Command.cs\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 parameters which a selected element has, and then show them in a list view of a form.\f1\par
\pard\nowidctlpar\f0\par
PropertiesForm.cs\f1\par
\pard\nowidctlpar\li360\f0 This file contains a Form class which consists of ok\f1 ,\f0 cancel buttons and a list view which lists the information of parameters of the selected element\f1 .\par
\par
\pard\nowidctlpar\b\f0 Description:\b0 \f1\par
\pard\nowidctlpar\fi-360\li360\tx360\f0 -\tab To get the collection of selected elements, use Document.Selection.Elements\f1 .\par
\pard\nowidctlpar\fi-360\li360\f0 -\tab To get the collection of parameters that the element has, use Element.Parameters\f1 .\par
\f0 -\tab Use Parameter.StorageType to get the parameter storage type and with the corresponding function (such as AsDouble() if the storage type is double) to get the value of it.\f1\par
\f0 -\tab To retrieve the element with its id, use Document.get_Element(ElementId id)\f1 .\par
\f0 -\tab To get the name of element, use Element.Name\f1 .\par
\pard\nowidctlpar\fi-360\li360\tx360\f0 -\tab ListView is used to show the string array in which each string stands for single parameter information.\f1\par
\pard\nowidctlpar\par
\b\f0 Instructions:\cf1\b0 \f1\par
\pard\nowidctlpar\fi-360\li360\tx360\cf0\f0 1.\tab Select only one element, such as a wall or floor and so on\f1 .\f0 (Note: if none or more than one element is selected, command will return failed and give an error message).\f1\par
\pard\nowidctlpar\fi-360\li360\f0 2.\tab Run the command.\par
}