C# Class Revit.SDK.Samples.NewRebar.CS.RebarShapeDef

This class wraps RebarShapeDefinition object.
Show file Open project: AMEE/revit Class Usage Examples

Protected Properties

Property Type Description
m_constraints List
m_parameters List
m_rebarshapeDefinition RebarShapeDefinition

Public Methods

Method Description
AddConstraint ( Type constraintType ) : ConstraintOnRebarShape

Add a constraint to RebarShapeDefinition.

AddParameter ( Type parameterType, object name, object value ) : RebarShapeParameter

Add a parameter to RebarShapeDefinition.

AllParameterTypes ( ) : List

Return all the parameter types supported by RebarShape definition.

AllowedConstraintTypes ( ) : List

Return all the constraint types supported by RebarShapeDefinition.

Commit ( System.Windows.Forms.Document rvtDoc, DefinitionGroup defGroup ) : void

Submit RebarShapeDefinition. All the parameters and constraints will be added to RebarShape. The RebarShape will be added to Revit document after successfully submitted.

RebarShapeDef ( RebarShapeDefinition shapeDef ) : System

Constructor, initialize the fields.

Method Details

AddConstraint() public method

Add a constraint to RebarShapeDefinition.
public AddConstraint ( Type constraintType ) : ConstraintOnRebarShape
constraintType System.Type Type of constraint /// (the class must be subclass of ConstraintOnRebarShape).
return ConstraintOnRebarShape

AddParameter() public method

Add a parameter to RebarShapeDefinition.
public AddParameter ( Type parameterType, object name, object value ) : RebarShapeParameter
parameterType System.Type Parameter type: /// (type of RebarShapeParameterDouble or type of RebarShapeParameterFormula)
name object Parameter name
value object Parameter value (double value or formula string)
return RebarShapeParameter

AllParameterTypes() public method

Return all the parameter types supported by RebarShape definition.
public AllParameterTypes ( ) : List
return List

AllowedConstraintTypes() public method

Return all the constraint types supported by RebarShapeDefinition.
public AllowedConstraintTypes ( ) : List
return List

Commit() public method

Submit RebarShapeDefinition. All the parameters and constraints will be added to RebarShape. The RebarShape will be added to Revit document after successfully submitted.
public Commit ( System.Windows.Forms.Document rvtDoc, DefinitionGroup defGroup ) : void
rvtDoc System.Windows.Forms.Document
defGroup DefinitionGroup Parameter definition group
return void

RebarShapeDef() public method

Constructor, initialize the fields.
public RebarShapeDef ( RebarShapeDefinition shapeDef ) : System
shapeDef RebarShapeDefinition RebarShapeDefinition object to be wrapped
return System

Property Details

m_constraints protected property

All the dimensions will be added to RebarShapeDefinition.
protected List m_constraints
return List

m_parameters protected property

All the parameters will be added to RebarShapeDefinition.
protected List m_parameters
return List

m_rebarshapeDefinition protected property

RebarShape definition, the real object to be wrapped.
protected RebarShapeDefinition m_rebarshapeDefinition
return RebarShapeDefinition