RVTDocs.com
Namespace: Autodesk.Revit.DB

LayoutRuleFixedNumber

Class
Description:
This class indicate the layout rule of a Beam System is Fixed-Number.
Remarks:
To use this type of LayoutRule, only the number of the beams must be set.
Inheritance Hierarchy:
System.Object
  Autodesk.Revit.DB.APIObject
    Autodesk.Revit.DB.LayoutRule
      Autodesk.Revit.DB.LayoutRuleFixedNumber
Syntax
Examples
private bool LayoutRuleFixedNumberInformation(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 
    LayoutRuleFixedNumber myLayoutRuleFixedNumber =
                        new LayoutRuleFixedNumber(8);

    //set the new layoutRule to the beamsystem
    beamSystem.LayoutRule = myLayoutRuleFixedNumber;

    LayoutRuleFixedNumber fixedNumber = beamSystem.LayoutRule as LayoutRuleFixedNumber;

    if (null == fixedNumber)
    {
        return false;
    }
    //try to get the property value of the beamsystem LayoutRule
    int numberOfLines = fixedNumber.NumberOfLines;

    message += "\nNew BeamSystem layout rule: " + fixedNumber;
    message += "\nNew BeamSystem number of beams: " + numberOfLines;

    TaskDialog.Show("Revit",message);

    return true;
}
LayoutRuleFixedNumber Class Members:
Name Description Inherited From
LayoutRuleFixedNumber Constructor of LayoutRuleFixedNumber.
Name Description Inherited From
IsReadOnly Identifies if the object is read-only or modifiable. (Inherited from APIObject ) APIObject
NumberOfLines Get or set the number of the beams in a beam system.
Name Description Inherited From
Dispose Causes the object to release immediately any resources it may be utilizing. (Inherited from APIObject ) APIObject
Equals Determines whether the specified object is equal to the current object. (Inherited from Object ) Object
GetHashCode Serves as the default hash function. (Inherited from Object ) Object
GetType Gets the Type of the current instance. (Inherited from Object ) Object
ToString Returns a string that represents the current object. (Inherited from Object ) Object