Namespace:
Autodesk.Revit.DB
LayoutRuleClearSpacing
Class
Description:
This class indicate the layout rule of a Beam System is Clear-Spacing.
This class indicate the layout rule of a Beam System is Clear-Spacing.
Remarks:
To use this type of LayoutRule, the distance between the beams and the justify-type must be set.
To use this type of LayoutRule, the distance between the beams and the justify-type must be set.
Inheritance Hierarchy:
System.Object
Autodesk.Revit.DB.APIObject
Autodesk.Revit.DB.LayoutRule
Autodesk.Revit.DB.LayoutRuleClearSpacing
System.Object
Autodesk.Revit.DB.APIObject
Autodesk.Revit.DB.LayoutRule
Autodesk.Revit.DB.LayoutRuleClearSpacing
Examples
private bool LayoutRuleClearSpacingInformation(BeamSystem beamSystem)
{
//get the layoutRule of the beamsystem
Autodesk.Revit.DB.LayoutRule layoutRule = beamSystem.LayoutRule;
string message = "BeamSystem layout rule : " + layoutRule;
//create a new instance of the LayoutRuleClearSpacing class
LayoutRuleClearSpacing myLayoutRuleClearSpacing =
new LayoutRuleClearSpacing(10.0, BeamSystemJustifyType.Beginning);
//set the new layoutRule to the beamsystem
beamSystem.LayoutRule = myLayoutRuleClearSpacing;
LayoutRuleClearSpacing clearSpacing = beamSystem.LayoutRule as LayoutRuleClearSpacing;
if (null == clearSpacing)
{
return false;
}
//try to get the property value of the beamsystem LayoutRule
BeamSystemJustifyType justifyType = clearSpacing.JustifyType;
double spacing = clearSpacing.Spacing;
message += "\nNew BeamSystem layout rule: " + clearSpacing;
message += "\nNew BeamSystem spacing: " + spacing;
message += "\nNew BeamSystem justification: " + justifyType;
TaskDialog.Show("Revit",message);
return true;
}