Announcements

Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.

Help with setting rebar layout rule

Anonymous

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
Reply
1,269 Views
3 Replies
Replies (3)

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

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

Thommy_
Collaborator
Collaborator

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