Help with setting rebar layout rule

Help with setting rebar layout rule

Anonymous
Not applicable
1,674 Views
3 Replies
Message 1 of 4

Help with setting rebar layout rule

Anonymous
Not applicable

Revit 2018 API and versions prior had the following methods which were removed with the release of the 2019 API:

 

  • Autodesk.Revit.DB.Structure.Rebar.SetLayoutAsFixedNumber()
  • Autodesk.Revit.DB.Structure.Rebar.SetLayoutAsMaximumSpacing()
  • Autodesk.Revit.DB.Structure.Rebar.SetLayoutAsMinimumClearSpacing()
  • Autodesk.Revit.DB.Structure.Rebar.SetLayoutAsNumberWithSpacing()
  • Autodesk.Revit.DB.Structure.Rebar.SetLayoutAsSingle()

I have been trying to change the layout rule setting for a set of rebars without any success. Is there any replacement for the above mentioned methods that I do not know of? Could someone explain how one sets the layout rule for a given rebar element with Revit 2019 API?

 

I will be grateful for any assistance offered.

0 Likes
1,675 Views
3 Replies
Replies (3)
Message 2 of 4

Sydra7
Contributor
Contributor

I have the same problem. Those functions are replaced to the RebarFreeFormAccessor class but I get SEHException every time if I try to use those functions.

0 Likes
Message 3 of 4

Sydra7
Contributor
Contributor

So the free form rebar is just full of bugs. I think the api functions are not even tested once. I recreated the rebar as shape driven rebar then I called the

rebar.GetShapeDrivenAccessor()

 This accessor allowed me to use the

accessor.SetLayoutAsMaximumSpacing(spacingarrayLengthtruetruetrue);

function without SEHExceptions. So it is working.

0 Likes
Message 4 of 4

Thommy_
Advisor
Advisor

hi @Anonymous 

have a look at line ~400:

 

https://github.com/tt-acm/DynamoForRebar/blob/master/src/DynamoRebar/Nodes.cs

 

Best,

Thomas


Thomas Vogt

VDC Technology & Process Manager


EESignature




Revit®, Dynamo, BIM  |  Training und Consulting in Stuttgart

E-Mail | Twitter | LinkedIn | YouTube | Facebook | Blog

0 Likes