Rebar shape length parameters inverted when creating rebar from curves
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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”:
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:
This is the code:
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.
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):
And in the code I define the points like this:
I get this rebar. Now the first curve (curve0) gets the correct length parameter (B)
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!