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

26 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 PhysicalProp\line\b Revit Platform:\b0 Structure\line\b Revit Version:\b0 2011.0\line\b First Released For:\b0 8.0\line\b Programming Language:\b0 C#\line\b Skill Level:\b0 Beginning\line\b Category:\b0 Parameters, Materials\line\b Type:\b0 ExternalCommand\line\line\b Subject:\b0 Display physical property.\line\b Summary:\b0 \line This sample demonstrates how to get the physical material of a column or beam.\f1\par
\f0\par
\b Classes:\b0 \f1\par
\pard\nowidctlpar\li360\f0 Autodesk.Revit.DB.FamilyInstance\f1\par
\f0 Autodesk.Revit.DB.Parameter\f1\par
\f0 Autodesk.Revit.DB.Document\f1\par
\par
\pard\nowidctlpar\b\f0 Project Files:\b0 \par
Command.cs\f1\par
\pard\nowidctlpar\li360\f0 This file defines a class DumpMaterialPhysicalParameters which inherits from IExternalCommand. Its function is to show a message box that contains the material information of the selected column or beam.\f1\par
\pard\nowidctlpar\par
\b\f0 Description:\b0 \f1\par
\pard\nowidctlpar\fi-360\li360\tx360\f0 -\tab To get the parameters of an element, use FamilyInstance.Parameters.\par
\pard\nowidctlpar\fi-360\li360 -\tab To get the material parameter of a beam or column, iterate through all the parameters of an element by searching Parameter.Definition named "Column Material" or "Beam Material".\par
-\tab To get the detail material properties, use Parameter.get_Parameter(BuiltInParameter). \f1\par
\pard\nowidctlpar\li360\f0 Such as get_Parameter(BuiltInParameter.PHY_MATERIAL_PARAM_TYPE) to get the material type or use FamilyInstance.Material (recommended). To get more information about BuiltInParameter, please refer to the help file of Revit API.\f1\par
\pard\nowidctlpar\par
\b\f0 Instructions:\cf1\b0 \f1\par
\pard\nowidctlpar\fi-360\li360\tx360\cf0\f0 1.\tab Prepare your Revit project. Make sure there are some structural beams, braces or columns in current document. A sample project file RotateFramingObjects.rvt is available in the sample RotateFramingObjects\rquote folder\f1\par
\pard\nowidctlpar\fi-360\li360\f0 2.\tab Select only one instance of structural column or beam.\f1\par
\f0 3.\tab Run the command.\f1\par
\f0 4.\tab It will show the material information of this instance in a message box.\f1\par
}