How to set rebar Layout Rules from fixed to Maximum space in REVIT API 2024

How to set rebar Layout Rules from fixed to Maximum space in REVIT API 2024

Arciviz
Advocate Advocate
461 Views
1 Reply
Message 1 of 2

How to set rebar Layout Rules from fixed to Maximum space in REVIT API 2024

Arciviz
Advocate
Advocate

How to set / (modify) rebar Layout Rules from fixed  to Maximum space in REVIT API 2024

Alternate to SetLayoutAsMaximumSpacing ?

 

using (Transaction tx = new Transaction(doc))
      {

        tx.Start("Transaction Name");
        var layoutRule = new RebarLayoutRule();
        layoutRule = RebarLayoutRule.MaximumSpacing;

        var rebar = Rebar.CreateFromCurvesAndShape(doc, rebarShape, rebarBarSize, null, null, elem,
          XYZ.BasisY, curves, RebarHookOrientation.Right, RebarHookOrientation.Left);

        

        tx.Commit();
      }
0 Likes
Accepted solutions (1)
462 Views
1 Reply
Reply (1)
Message 2 of 2

Arciviz
Advocate
Advocate
Accepted solution
var getShapeDrivenAccessor = rebar.GetShapeDrivenAccessor();
        getShapeDrivenAccessor.SetLayoutAsMaximumSpacing(0.5, 4, true, true, true);