mirror of
https://github.com/jeremytammik/RevitSdkSamples.git
synced 2026-08-18 19:30:09 +00:00
32 lines
3.4 KiB
Plaintext
32 lines
3.4 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;}
|
|
\viewkind4\uc1\pard\b\f0\fs20 Application:\b0 SlabProperties\line\b Revit Platform:\b0 Structure\line\b Revit Version:\b0 2010.0\line\b First Released For:\b0 9.0\line\b Last Modified:\b0 3/5/2008\cf1\f1\par
|
|
\cf0\b\f0 Modified By:\b0 JJ Autodesk\line\b Programming Language:\b0 VB.NET\line\b Skill Level:\b0 Beginning\line\b Category:\b0 Parameters, Elements\line\b Type:\b0 ExternalCommand\line\line\b Subject:\b0 Slab properties retrieval.\line\b Summary:\b0 \line This sample demonstrates how to get Slab\rquote s properties which consist of Level, Type Name, Span Direction and Slab\rquote s Layers information (Material Name, Thickness, Young Modulus X, Y and Z)\f1 .\par
|
|
\f0\par
|
|
\b Classes:\b0 \f1\par
|
|
\pard\fi360\f0 Autodesk.Revit.IExternalCommand\f1\par
|
|
\f0 Autodesk.Revit.Elements.Floor\f1\par
|
|
\f0 Autodesk.Revit.Structural.CompoundStructureLayer\f1\par
|
|
\f0 Autodesk.Revit.Structural.CompoundStructureLayerArray\f1\par
|
|
\f0 Autodesk.Revit.Parameters.BuiltInParameter\f1\par
|
|
\pard\f0\par
|
|
\b Project Files:\b0 \par
|
|
Command.vb\f1\par
|
|
\pard\li360\tx720\f0 This file contains the class Command which inherits from IExternalCommand interface and implements the Execute method; besides, the class implements all functionalities of getting relevant properties of Slab.\f1\par
|
|
\pard\par
|
|
\f0 SlabPropertiesForm.vb\f1\par
|
|
\pard\li360\tx720\f0 This file contains a Form class which consists of three TextBox controls for showing Level, Type Name, Span direction of Slab respectively; a RichTextBox control will show all Layers information of Slab.\f1\par
|
|
\pard\par
|
|
\b\f0 Description:\b0 \par
|
|
This sample uses Structural and Parameters classes mostly to implement the functionality of getting Slab\rquote s information which consist of Level, Type Name, Span Direction and all Layers information (Material name, Young Modulus)\f1 .\par
|
|
\pard\fi-360\li360\tx360\f0 -\tab Slab objects can be gotten from ActiveDocument.Selection.Elements\f1 .\par
|
|
\pard\fi-360\li360\f0 -\tab Floor.Level.Name, Floor.FloorType.Name and Floor.get_Parameter(BuiltInParameter.FLOOR_PARAM_SPAN_DIRECTION) can be used to get the Level, Type name and Span direction of Slab respectively\f1 .\par
|
|
\f0 -\tab Floor.FloorType.CompoundStructure.Layers can be used to retrieve the Structure Layers collection of Slab\f1 .\par
|
|
\f0 -\tab CompoundStructureLayer class\rquote s Thickness, Material properties and get_Parameter() method can retrieve the thickness, material and the young modulus of Slab.\f1\par
|
|
\f0 -\tab Use BuiltInParameter.PHY_MATERIAL_PARAM_YOUNG_MOD1, PHY_MATERIAL_PARAM_YOUNG_MOD2 and PHY_MATERIAL_PARAM_YOUNG_MOD3 to retrieve the X, Y, Z Young Modulus respectively. \f1\par
|
|
\pard\par
|
|
\b\f0 Instructions:\cf1\b0 \f1\par
|
|
\pard\fi-360\li360\tx360\cf0\f0 1.\tab Start Revit, draw a Slab, and then define some relevant parameters (such as Level, Material) for this new Slab. One .rvt file named SlabProperties.rvt is available under sample project folder, material and layers have been added, you can open this file and select the existing floor to run the sample. \f1\par
|
|
\f0 2.\tab Select this Slab and click the extern command, Slab properties form will be popped up: Level, Thickness, Span direction and all Layer properties for selected Slab will be showed in TextBox and RichTextBox controls of this Form.\f1\par
|
|
}
|
|
|