C# Class Revit.SDK.Samples.CreateBeamsColumnsBraces.CS.Command

Inheritance: IExternalCommand
Datei anzeigen Open project: AMEE/revit

Public Methods

Method Description
AddInstance ( object columnObject, object beamObject, object braceObject, int floorNumber ) : bool

check the number of floors is less than the number of levels create beams, columns and braces according to selected types

CreateMatrix ( int xNumber, int yNumber, double distance ) : void

generate 2D coordinates of matrix according to parameters

Execute ( Autodesk revit, string &message, Autodesk elements ) : Autodesk.Revit.UI.Result

Implement this method as an external command for Revit.

Private Methods

Method Description
Initialize ( ) : bool

iterate all the symbols of levels, columns, beams and braces

PlaceBeam ( Autodesk point2D1, Autodesk point2D2, Level baseLevel, Level topLevel, FamilySymbol beamType ) : void

create beam of certain type in certain position

PlaceBrace ( Autodesk point2D1, Autodesk point2D2, Level baseLevel, Level topLevel, FamilySymbol braceType, bool isXDirection ) : void

create brace of certain type in certain position between two adjacent columns

PlaceColumn ( Autodesk point2D, FamilySymbol columnType, Level baseLevel, Level topLevel ) : void

create column of certain type in certain position

Method Details

AddInstance() public method

check the number of floors is less than the number of levels create beams, columns and braces according to selected types
public AddInstance ( object columnObject, object beamObject, object braceObject, int floorNumber ) : bool
columnObject object type of column
beamObject object type of beam
braceObject object type of brace
floorNumber int number of floor
return bool

CreateMatrix() public method

generate 2D coordinates of matrix according to parameters
public CreateMatrix ( int xNumber, int yNumber, double distance ) : void
xNumber int Number of Columns in the X direction
yNumber int Number of Columns in the Y direction
distance double Distance between columns
return void

Execute() public method

Implement this method as an external command for Revit.
public Execute ( Autodesk revit, string &message, Autodesk elements ) : Autodesk.Revit.UI.Result
revit Autodesk An object that is passed to the external application /// which contains data related to the command, /// such as the application object and active view.
message string A message that can be set by the external application /// which will be displayed if a failure or cancellation is returned by /// the external command.
elements Autodesk A set of elements to which the external application /// can add elements that are to be highlighted in case of failure or cancellation.
return Autodesk.Revit.UI.Result