kuklev9797's picture
download
raw
2.37 kB
Application: CreateBeamSystem
Revit Platform: Structure
Revit Version: 2011.0
First Released For: 9.1
Programming Language: C#
Skill Level: High
Category: Structure
Type: ExternalCommand
Subject: Create beamsystem.
Summary:
This sample demonstrates how to generate a beam system with the horizontal linear beams selections profile.
Classes:
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.DB.BeamSystem
Autodesk.Revit.DB.BeamSystem.LayoutRule
Autodesk.Revit.DB.FamilySymbol
Project Files:
Command.cs
This is the main DLL source file. It contains the class Command which implements interface IExternalCommand.
BeamSystemBuilder.cs
This file contains a class BeamSystemBuilder which is used to create new instance of beam system.
BeamSystemData.cs
This file contains a class BeamSystemData which is a mixed data class (save the data showed in UI and the data used to create beam system).
Description:
-
User selects some linear beams which make a horizontal profile first, and create a beam system with this profile. Allow user change the layout method and beam type of the created beam system.
-
The command displays a dialog with a preview window on the left and generic properties grid on the right.
-
The generic property grid allows user to change the Layout method (clear spacing, fixed distance, fixed number and maximum spacing) and Beam type.
-
The preview window displays the profile of the beam system and its direction.
-
Beam systems direction is decided by the first line in the CurveArray that is taken as the parameter of profile in NewBeamSystem method.
-
Beam systems layout method and beam type can be retrieved and modified through BeamType and LayoutRule properties of BeamSystem.
-
Use Autodesk.Revit.Creation.Document.NewBeamSystem(CurveArray) method to create BeamSystem.
Instructions:
1.
Draw some horizontal linear beams with a closed profile.
2.
Select these beams and run this command.
3.
On the sample UI if you want change the beam system direction displayed in the picture box, please click the Change Direction button.
4.
User can select Layout method and Beam type which listed in the right property grid in the sample UI.
5.
Expected result: return to Revit after run this sample a beam system will present in the Revit main program view.

Xet Storage Details

Size:
2.37 kB
·
Xet hash:
46b669808d902e84c7667013928220965813741d725dcb9b3fd568f40eca837f

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.