Rebar: Different results between Revit and Dynamo


I’ve run into an issue where I get different results when modifying the rebar parameters. I will show with examples. (please view pictures in pdf, as a new user can only embed one file)

First approach: Put rebar and the modify parameters in revit.

Using the dynamo routine: (Figure 1).

The result is (Figure 2)

Then, modifying the BASE parameter to 10 cm, I get the desired result. (Figure 3)

Second approach: Doing everything in dynamo.
The dynamo routine puts the rebar, set the spacing and modifies the BASE parameter. (Figure 4)

The result, in Figure 5, shows the rebar completely outside of the host elements.


The first approach works as expected. The parameters are modified and the rebar stay in its place.
The first approach correctly modifies the parameters, but the rebar is moved outside de host.

It seems like the first approach modifies BASE from the “left” part of the rebar, and the second doest the same but from “right” side.

How can I get the first result using the second approach?

Make sure you’re doing things in the same order as well. Your full script may be writing to the parameter values before the layout is set. Try setting BASE and ALTO with the output element from SetLayoutAsMaximumSpacing (assuming it’s the same rebar element).

I also tried that, but the result is the same.

And you closed, deleted the element, and reran the graph when you did that right?

I assume this is the exact same location in both images and your graph is written the exact same way besides the parameter assignment at the end, but it could also be that the layout is being drawn in the wrong direction. Afraid I don’t have any experience with drawing rebar so I can only guess at some general situations.

Yeah I deleted all rebar, and ran it again in the same elements, but with the arrows shown in the picture I posted above.