mirror of
https://github.com/jeremytammik/RevitSdkSamples.git
synced 2026-08-17 10:59:05 +00:00
43 lines
3.1 KiB
Plaintext
43 lines
3.1 KiB
Plaintext
{\rtf1\fbidis\ansi\ansicpg1252\deff0\deflang1033\deflangfe2052{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\fswiss\fprq2\fcharset0 Verdana;}}
|
|
{\colortbl ;\red0\green0\blue255;}
|
|
\viewkind4\uc1\pard\ltrpar\b\f0\fs20 Application:\b0 CreateDimensions\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 02/26/2008\line\b Modified By:\b0 LL Autodesk\line\b Programming Language:\b0 C#\line\b Skill Level:\b0 Medium\line\b Category:\b0 Annotation\line\b Type:\b0 ExternalCommand\line\line\b Subject:\b0 Create dimensions.\line\b Summary:\b0 \line This sample shows how to add a dimension to a selected structure wall from its start to its end.\i\par
|
|
\i0\f1\par
|
|
\b\f0 Classes:\b0 \par
|
|
\pard\ltrpar\fi360 Autodesk.Revit.IExternalCommand\f1\par
|
|
\f0 Autodesk.Revit.Elements.View\f1\par
|
|
\f0 Autodesk.Revit.Elements.Wall\par
|
|
Autodesk.Revit.Elements.Dimension\par
|
|
Autodesk.Revit.CategorySet\par
|
|
Autodesk.Revit.Category\par
|
|
Autodesk.Revit.SelElementSet \par
|
|
Autodesk.Revit.Location\par
|
|
Autodesk.Revit.LocationCurve\par
|
|
Autodesk.Revit.Geometry.Curve\par
|
|
Autodesk.Revit.Geometry.Line\par
|
|
Autodesk.Revit.Geometry.ReferenceArray\par
|
|
Autodesk.Revit.Geometry.Options\par
|
|
Autodesk.Revit.Geometry.Element\par
|
|
Autodesk.Revit.Geometry.GeometryObjectArray\par
|
|
Autodesk.Revit.Geometry.GeometryObject\par
|
|
\pard\ltrpar\par
|
|
\b Project Files:\b0 \i\par
|
|
\i0 Command.vb\f1\par
|
|
\pard\ltrpar\li360\f0 It contains the class Command which implements interface IExternalCommand. It also provides the function of adding a dimension to a selected wall from its start point to its end point\f1 .\i\par
|
|
\pard\ltrpar\i0\par
|
|
\b\f0 Description:\b0 \f1\par
|
|
\f0 This sample provides following functionalities.\f1\par
|
|
\pard\ltrpar\fi-360\li360\tx360\f0 -\tab To get one element by using its Id, use Docment.Element(ElementId) method\f1 .\par
|
|
\f0 -\tab Retrieve all the walls in the current project.\par
|
|
-\tab Loop to get every wall and perform following actions\f1\par
|
|
\pard\ltrpar\fi-360\li360\f0 -\tab Get the wall\rquote s local curve and create a new bound line with its start point and end point\f1\par
|
|
\pard\ltrpar\fi-420\li840\tx840\f2 -\tab\f0 Loop the wall\rquote s geometry elements and find the two upright lines beside the line created in step 1. Create a reference array contains the references of the two lines\f1\par
|
|
\pard\ltrpar\fi-420\li840\f2 -\tab\f0 Create a new bound line which is close and parallel to the line in step 1\f1\par
|
|
\f2 -\tab\f0 Create a dimension for the wall using the reference array as its bounds and the parallel line as its place\f1\par
|
|
\pard\ltrpar\fi-600\li600\par
|
|
\pard\ltrpar\b\f0 Instructions:\cf1\b0 \f1\par
|
|
\pard\ltrpar\fi-360\li360\tx360\cf0\f0 1.\tab Open Revit Structure\f1 .\f0\par
|
|
\pard\ltrpar\fi-360\li360 2.\tab Draw some walls which have analytical model lines and select them\par
|
|
3.\tab Make sure that the active view is not a View3D or ViewSheet. \par
|
|
\pard\ltrpar\fi-360\li360\tx360 4.\tab Execute the external Command\f1 .\par
|
|
}
|
|
|