This class indicate the layout rule of a Beam System is Fixed-Distance.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 23.0.0.0 (23.1.0.0)
Syntax
C# |
---|
public class LayoutRuleFixedDistance : LayoutRule |
Visual Basic |
---|
Public Class LayoutRuleFixedDistance _ Inherits LayoutRule |
Visual C++ |
---|
public ref class LayoutRuleFixedDistance : public LayoutRule |
Remarks
To use this type of LayoutRule, the distance between the beams and the justify-type must be set.
Examples

private bool LayoutRuleFixedDistanceInformation(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 LayoutRuleFixedDistance myLayoutRuleFixedDistance = new LayoutRuleFixedDistance(10.0, BeamSystemJustifyType.End); //set the new layoutRule to the beamsystem beamSystem.LayoutRule = myLayoutRuleFixedDistance; LayoutRuleFixedDistance fixedDistance = beamSystem.LayoutRule as LayoutRuleFixedDistance; if (null == fixedDistance) { return false; } //try to get the property value of the beamsystem LayoutRule BeamSystemJustifyType justifyType = fixedDistance.JustifyType; double spacing = fixedDistance.Spacing; message += "\nNew BeamSystem layout rule: " + fixedDistance; message += "\nNew BeamSystem spacing: " + spacing; message += "\nNew BeamSystem justification: " + justifyType; TaskDialog.Show("Revit",message); return true; }

Private Function LayoutRuleFixedDistanceInformation(beamSystem As BeamSystem) As Boolean 'get the layoutRule of the beamsystem Dim layoutRule As Autodesk.Revit.DB.LayoutRule = beamSystem.LayoutRule Dim message As String = "BeamSystem layout rule : " & layoutRule.ToString() 'create a new instance of the LayoutRuleClearSpacing class Dim myLayoutRuleFixedDistance As New LayoutRuleFixedDistance(10.0, BeamSystemJustifyType.[End]) 'set the new layoutRule to the beamsystem beamSystem.LayoutRule = myLayoutRuleFixedDistance Dim fixedDistance As LayoutRuleFixedDistance = TryCast(beamSystem.LayoutRule, LayoutRuleFixedDistance) If fixedDistance Is Nothing Then Return False End If 'try to get the property value of the beamsystem LayoutRule Dim justifyType As BeamSystemJustifyType = fixedDistance.JustifyType Dim spacing As Double = fixedDistance.Spacing message += vbLf & "New BeamSystem layout rule: " & fixedDistance.ToString() message += vbLf & "New BeamSystem spacing: " & spacing message += vbLf & "New BeamSystem justification: " & justifyType TaskDialog.Show("Revit", message) Return True End Function
Inheritance Hierarchy
System..::..Object
Autodesk.Revit.DB..::..APIObject
Autodesk.Revit.DB..::..LayoutRule
Autodesk.Revit.DB..::..LayoutRuleFixedDistance
Autodesk.Revit.DB..::..APIObject
Autodesk.Revit.DB..::..LayoutRule
Autodesk.Revit.DB..::..LayoutRuleFixedDistance