C# Class Revit.SDK.Samples.Reinforcement.CS.FramReinMaker

The base class for family instance reinforcement creation. It only implement the Run() method. which give the flow process for creation.
Inheritance: IFrameReinMaker
Mostra file Open project: AMEE/revit

Protected Properties

Property Type Description
m_hookTypes List
m_hostObject FamilyInstance
m_rebarTypes List
m_revitDoc Autodesk.Revit.DB.Document

Protected Methods

Method Description
AssertData ( ) : bool

This is a virtual method which used to check the data whether is right and enough.

DisplayForm ( ) : bool

This is a virtual method which used to collect creation information

FillWithBars ( ) : bool

This is a virtual method which used to create reinforcement.

FramReinMaker ( ExternalCommandData commandData, FamilyInstance hostObject ) : System

The constructor of FramReinMaker

PlaceRebars ( RebarBarType rebarType, RebarHookType startHook, RebarHookType endHook, RebarGeometry geomInfo, RebarHookOrientation startOrient, RebarHookOrientation endOrient ) : Rebar

A wrap fuction which used to create the reinforcement.

SetRebarSpaceAndNumber ( Rebar bar, int number, double spacing ) : void

The helper function to changed rebar number and spacing properties

Private Methods

Method Description
GetHookTypes ( ExternalCommandData commandData ) : bool

get all the hook types in current project, and store in m_hookTypes data

GetRebarTypes ( ExternalCommandData commandData ) : bool

get all the rebar types in current project, and store in m_rebarTypes data

IFrameReinMaker ( ) : bool

Implement the Run() method of IFrameReinMaker interface. Give the flew process of the reinforcement creation.

Method Details

AssertData() protected method

This is a virtual method which used to check the data whether is right and enough.
protected AssertData ( ) : bool
return bool

DisplayForm() protected method

This is a virtual method which used to collect creation information
protected DisplayForm ( ) : bool
return bool

FillWithBars() protected method

This is a virtual method which used to create reinforcement.
protected FillWithBars ( ) : bool
return bool

FramReinMaker() protected method

The constructor of FramReinMaker
protected FramReinMaker ( ExternalCommandData commandData, FamilyInstance hostObject ) : System
commandData ExternalCommandData the ExternalCommandData reference
hostObject FamilyInstance the host family instance
return System

PlaceRebars() protected method

A wrap fuction which used to create the reinforcement.
protected PlaceRebars ( RebarBarType rebarType, RebarHookType startHook, RebarHookType endHook, RebarGeometry geomInfo, RebarHookOrientation startOrient, RebarHookOrientation endOrient ) : Rebar
rebarType RebarBarType The element of RebarBarType
startHook RebarHookType The element of start RebarHookType
endHook RebarHookType The element of end RebarHookType
geomInfo RebarGeometry The goemetry information of the rebar
startOrient RebarHookOrientation An Integer defines the orientation of the start hook
endOrient RebarHookOrientation An Integer defines the orientation of the end hook
return Rebar

SetRebarSpaceAndNumber() protected static method

The helper function to changed rebar number and spacing properties
protected static SetRebarSpaceAndNumber ( Rebar bar, int number, double spacing ) : void
bar Rebar The rebar instance which need to modify
number int The rebar number want to set
spacing double The spacing want to set
return void

Property Details

m_hookTypes protected_oe property

a list to store all the hook types
protected List m_hookTypes
return List

m_hostObject protected_oe property

the family instance to places rebar on
protected FamilyInstance m_hostObject
return FamilyInstance

m_rebarTypes protected_oe property

a set to store all the rebar types
protected List m_rebarTypes
return List

m_revitDoc protected_oe property

the API create handle
protected Document,Autodesk.Revit.DB m_revitDoc
return Autodesk.Revit.DB.Document