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

Rotation of stirrup rebar (rotated beam)

11 REPLIES 11
Reply
Message 1 of 12
jaroslav.kopecky
1356 Views, 11 Replies

Rotation of stirrup rebar (rotated beam)

Hello,

I am trying to layout rebars on rotated beams (this case is 30 degrees rotation based on driving line)

 

On the picture we can see that layout is corrupted, while without rotation layout is OK.

 

Where is the problem? Does Revit support that?

 

Greetings Jaroslav Kopecký

corrupted layout on 30 degrees rotated beam (part of rebar can be seen near the center and outside)corrupted layout on 30 degrees rotated beam (part of rebar can be seen near the center and outside)layout OKlayout OKsection viewsection view

11 REPLIES 11
Message 2 of 12

Hi, 

This is what I am getting. May be you could upload your file for further investigation.

image.png

 

Message 3 of 12

Hello Shefy,

 

I attached rvt project. I am using Revit api to create beam.

When rotation is multiply of 45 degrees it is OK.

Message 4 of 12

Hi @jaroslav.kopecky,

I could not find any problem in your file. I tried with the default 330 degree rotation in your file and this is the result..

image.png

Message 5 of 12

Hello,

in my file, there is 3D view called "3D Reinfocements". When you open that view what do you see? I can see a beam with corrupted image of stirrup rebar inside (like on included attachement - only the initial view is overall). 

So I don't know where is the problem. May be "data" could be OK, but view doesn't looks correct.

 

Message 6 of 12

Hi @jaroslav.kopecky,

Your Major segment of the stirrup bar is somehow came at the bottom as shown in the pic.

image.png
image.png

So select the stirrups and edit the family and change the major segment of the bar as shown in the below pic and upload it to your file. The problem will get resolved.

image.png

image.png

Corrected Stirrups

image.png

Message 7 of 12

Hello,

I am afraid this is not the good way, how to "correct" stirrup rebar.

 

I tried the procedure that you suggested and it looked quite successful. But there are few "complications" why I can't use it.

First, it is almost the same as if I would create new stirrup rebar manually.

Then even though I changed that major segment to be on left, when I again repeat the process of creation of stirrup by api call, I get again corrupted picture.

 

So this is what I need to achieve. I am using API to create things in Revit, I need to achieve correct behavior via API, not by manual manipulation.

And even I edited Family of this particular shape of Rebar, it did not end up in correct creation behavior.

Message 8 of 12

Hi @jaroslav.kopecky,

I see..I am sorry, I do not have much experience with Revit API, But I may suggest you to post this issue on the Revit API forum. May be someone will help you..

Message 9 of 12

Hello Shefy,

OK, no problem.

So I will look for API forum, I didn't know there exist specific forum for API. Should I close this by "accept"?

Anyway thanks for your points..

Message 10 of 12

You welcome. Based on my little knowledge regarding the rebar creation
using dynamo, did you set in your api code to create the rebar and hooks
using the curve "normal" vector?!
Are you creating the stirrups from closed polycurve?!
Message 11 of 12

this is the process for stirrups:

(1) create

Rebar.CreateFromRebarShape(RevitDocument, stirrupShape, barType, element, origin, xVec, yVec)

 

(2) reset hooks (performed everytime, sometimes to ElementId.InvalidElementId)

createdStirrupRebar.SetHookTypeId(0, selectedStirrupHook.Id);
createdStirrupRebar.SetHookTypeId(1, selectedStirrupHook.Id);

 

(3) layout (position and dimensions tuning) by ScaleToBox()
RebarShapeDrivenAccessor rebarStirrupShapeDrivenAccessor = createdStirrupRebar.GetShapeDrivenAccessor();
rebarStirrupShapeDrivenAccessor.SetLayoutAsFixedNumber(stirrupItem.iCountOfLinks, layoutLenght, true, true, true);
rebarStirrupShapeDrivenAccessor.ScaleToBox(stirrupItemOrigin, xVecLayout, yVecLayout);

Message 12 of 12

Just fyi and follow-up, the API issue is discussed in the Revit API forum in the following thread:

 

https://forums.autodesk.com/t5/revit-api-forum/rotation-of-stirrup-rebar-rotated-beam-api/m-p/825190...

 

Cheers,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

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

Post to forums  

Autodesk Design & Make Report


Autodesk Design & Make Report