Skip to content

LayoutRuleClearSpacing

Public Class

This class indicate the layout rule of a Beam System is Clear-Spacing.

Inheritance Hierarchy

System.Object
Autodesk.Revit.DB.APIObject
Autodesk.Revit.DB.LayoutRule
Autodesk.Revit.DB.LayoutRuleClearSpacing

Namespace: Autodesk.Revit.DB

Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)

Syntax

public class LayoutRuleClearSpacing : LayoutRule

The LayoutRuleClearSpacing type exposes the following members.

Constructors

Name

Description


Public Method
LayoutRuleClearSpacing

Constructor of LayoutRuleFixedDistance. Create LayoutRuleFixedDistance with the values passed in.


Properties

Name

Description


Public Property
Code Example

Identifies if the object is read-only or modifiable.
(Inherited from APIObject)


Public Property
JustifyType

Get or set the type of justification.


Public Property
Spacing

Get or set the spacing of the beam system.


Methods

Name

Description


Public Method
Dispose

Causes the object to release immediately any resources it may be utilizing.
(Inherited from APIObject)


Public Method

Equals

Determines whether the specified object is equal to the current object.
(Inherited from Object)


Public Method

GetHashCode

Serves as the default hash function.
(Inherited from Object)


Public Method

GetType

Gets the Type of the current instance.
(Inherited from Object)


Public Method

ToString

Returns a string that represents the current object.
(Inherited from Object)


Remarks

To use this type of LayoutRule, the distance between the beams and the justify-type must be set.

Example

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;
}