Buckets:
| Application: CreateDimensions | |
| Revit Platform: Structure | |
| Revit Version: 2011.0 | |
| First Released For: 9.0 | |
| Programming Language: C# | |
| Skill Level: Medium | |
| Category: Annotation | |
| Type: ExternalCommand | |
| Subject: Create dimensions. | |
| Summary: | |
| This sample shows how to add a dimension to a selected structure wall from its start to its end. | |
| Classes: | |
| Autodesk.Revit.UI.IExternalCommand | |
| Autodesk.Revit.DB.View | |
| Autodesk.Revit.DB.Wall | |
| Autodesk.Revit.DB.Dimension | |
| Autodesk.Revit.DB.CategorySet | |
| Autodesk.Revit.DB.Category | |
| Autodesk.Revit.UI.Selection.SelElementSet | |
| Autodesk.Revit.DB.Location | |
| Autodesk.Revit.DB.LocationCurve | |
| Autodesk.Revit.DB.Curve | |
| Autodesk.Revit.DB.Line | |
| Autodesk.Revit.DB.ReferenceArray | |
| Autodesk.Revit.DB.Options | |
| Autodesk.Revit.DB.Element | |
| Autodesk.Revit.DB.GeometryObjectArray | |
| Autodesk.Revit.DB.GeometryObject | |
| Project Files: | |
| Command.vb | |
| 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. | |
| Description: | |
| This sample provides following functionalities. | |
| - | |
| To get one element by using its Id, use Docment.Element(ElementId) method. | |
| - | |
| Retrieve all the walls in the current project. | |
| - | |
| Loop to get every wall and perform following actions | |
| - | |
| Get the walls local curve and create a new bound line with its start point and end point | |
| - | |
| Loop the walls 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 | |
| - | |
| Create a new bound line which is close and parallel to the line in step 1 | |
| - | |
| Create a dimension for the wall using the reference array as its bounds and the parallel line as its place | |
| Instructions: | |
| 1. | |
| Open Revit Structure. | |
| 2. | |
| Draw some walls which have analytical model lines and select them | |
| 3. | |
| Make sure that the active view is not a View3D or ViewSheet. | |
| 4. | |
| Execute the external Command. |
Xet Storage Details
- Size:
- 1.99 kB
- Xet hash:
- 164e62084079e6698f1ccfecb551b41707b9ae5d49d6bf041db356a41ad883d1
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.