mirror of
https://github.com/jeremytammik/RevitSdkSamples.git
synced 2026-08-09 14:41:37 +00:00
37 lines
4.2 KiB
Plaintext
37 lines
4.2 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 MaterialProperties\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 VB.NET\line\b Skill Level:\b0 Medium\line\b Category:\b0 Materials\line\b Type:\b0 ExternalCommand\line\line\b Subject:\b0 Display Material Properties.\line\b Summary:\b0 \line This sample demonstrates how to get the material physical properties of a selected beam, column or brace, how to change the material type of the selected beam and how to change the unit weight of a selected beam, column or brace.\par
|
|
\b\f1\par
|
|
\f0 Classes:\b0 \par
|
|
\pard\ltrpar\nowidctlpar\fi360 Autodesk.Revit.UI.IExternalCommand\par
|
|
Autodesk.Revit.DB.FamilyInstance\f1\par
|
|
\f0 Autodesk.Revit.DB.Parameter\par
|
|
Autodesk.Revit.DB.Material\par
|
|
\pard\ltrpar\nowidctlpar\f1\tab\b\par
|
|
\f0 Project Files:\cf1\b0\par
|
|
\cf0 MaterialProperties\f1 .\f0 vb\f1\par
|
|
\pard\ltrpar\nowidctlpar\li360\f0 This file contains the main functionalities that how to get the material physical properties of a selected beam, column or brace, how to change the material type of the selected beam and how to change the unit weight of a selected beam, column or brace. It also implements the IExternalCommand interface.\f1\par
|
|
\pard\ltrpar\nowidctlpar\f0\par
|
|
\b Description:\f1\par
|
|
\b0\f0 Functionalities:\par
|
|
\pard\ltrpar\nowidctlpar\fi-360\li360\tx360 -\tab With the selected beam, column or brace the material physical properties of that object should be displayed in a dialog. \par
|
|
\pard\ltrpar\nowidctlpar\fi-360\li360 -\tab Present all material types and their sub types to the user and then change the material type of the selected beam to the one chosen by the user. \f1\par
|
|
\f0 -\tab With a selected concrete beam, column or brace change its unit weight to 145 P/ft3. Warn that this will change all instances of the elements that use this material.\f1\par
|
|
\pard\ltrpar\nowidctlpar\fi-360\li360\tx360\f0 -\tab Columns, Beams and Braces are represented as FamilyInstance objects within the Revit database.\f1\par
|
|
\pard\ltrpar\nowidctlpar\f0 Implementations:\f1\par
|
|
\pard\ltrpar\nowidctlpar\fi-360\li360\tx360\f0 -\tab The material element can be retrieved from a Family Instance object using the parameter named \ldblquote Column Material\rdblquote . This can be accessed in the manner shown in the sample code named Physical Prop. Other types of family instance will have a different name for this parameter which can be found using the Element Properties dialog.\par
|
|
\pard\ltrpar\nowidctlpar\fi-360\li360 -\tab All the available materials can be found by iterating through the document elements\f1 .\par
|
|
\f0 -\tab The Material Type can be retrieved by using the PHY_MATERIAL_PARAM_TYPE BuildInParameter\f1 .\par
|
|
\f0 -\tab Choices for a material type can be found by comparing all the Material\rquote s material type with the desired material type.\par
|
|
-\tab Material changes can be applied back to the element by using the \ldblquote Column Material\rdblquote property or similar property for other types mentioned above.\par
|
|
-\tab Physical properties of the material can be retrieved from the Material using various parameters\f1 .\par
|
|
\f0 -\tab The unit weight can be found from the Material by using the PHY_MATERIAL_PARAM_UNIT_WEIGHT BuildInParameter.\par
|
|
\pard\ltrpar\nowidctlpar\par
|
|
\b Instructions:\cf1\b0 \cf0\par
|
|
\pard\ltrpar\nowidctlpar\fi-360\li360\tx360 1.\tab Open a Revit document, and then draw some beams, structure columns or braces.\par
|
|
\pard\ltrpar\nowidctlpar\fi-360\li360 2.\tab Select a beam, a column or a brace; Load and run the MaterialProperties.dll\f1 .\f0\par
|
|
3.\tab Select a material type and sub material type, click the \ldblquote\ul A\ulnone pply\rdblquote button, then the selected beam, column or brace\rquote s material type will be changed.\par
|
|
4.\tab With a selected concrete beam, column or brace change its unit weight to 14.50 KN/m3 in metric project by clicking the \ldblquote Change Unit Weight\rdblquote button.\par
|
|
\pard\ltrpar\nowidctlpar\f1\fs24\par
|
|
}
|
|
|