Rebar shape length parameters inverted when creating rebar from curves

Rebar shape length parameters inverted when creating rebar from curves

purzua5SCRP
Explorer Explorer
301 Views
1 Reply
Message 1 of 2

Rebar shape length parameters inverted when creating rebar from curves

purzua5SCRP
Explorer
Explorer

Hello,

 

I’m having problems when creating rebars using the API (although I think the same issue also happens when using the Revit UI).

 

I have a custom Rebar Shape family named “TEST2”:

purzua5SCRP_0-1769526562591.png

To create a rebar in the following floor, I define three points, which define two curves. Hoping curve0 gets length A and curve1 length B:

purzua5SCRP_6-1769535648976.png

 

This is the code:

purzua5SCRP_7-1769535752136.png

 

After execution, I get this rebar. As you can see, the parameters are inverted: I expected the horizontal bar to have length A and the vertical bar to have length B.

purzua5SCRP_2-1769535036893.png

I already tried editing the Rebar Shape family so that length A > length B, but the result is the same.

 

Now, if I edit the Rebar Shape family (toggle Shape Orientation):

 

purzua5SCRP_3-1769535258702.png

 

And in the code I define the points like this:

purzua5SCRP_8-1769535854886.png

 

I get this rebar. Now the first curve (curve0) gets the correct length parameter (B)

purzua5SCRP_5-1769535414101.png

 

It would be great if someone could explain the logic behind this behavior.

 

Should I always define the points in the Shape Orientation order?

How does Revit assign parameters to rebars created using the CreateFromCurvesAndShape method?

 

Thanks in advance!

 

 

 

 

 

 

 

 

 

 

 

 

0 Likes
302 Views
1 Reply
Reply (1)
Message 2 of 2

purzua5SCRP
Explorer
Explorer

Any guidance, please? Thanks! this is Revit 2024

0 Likes