Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Help with setting rebar layout rule

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
1246 Views, 3 Replies

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

Help with setting rebar layout rule

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.

3 REPLIES 3
Message 2 of 4
Sydra7
in reply to: Anonymous

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

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.

Message 3 of 4
Sydra7
in reply to: Anonymous

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

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.

Message 4 of 4
Thommy_
in reply to: Anonymous

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

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report