Base Offset when creating Wall.ByCurveAnsHeight

Hi,

I’ve created a script to generate (curtain) walls, based on the size and position of the opening family.
It works fine, except the Base Offset of the created walls. When i run the script for one element, the Base Offset parameter is set correctly. With multiple elements selected it looks a kind of random, sometimes the Base Offset is set correct, but mostly it’s set at zero.
I was thinking about a lacing problem, which is strange because the width and height are set correctly.
Set the parameter after creating could be a workaround, but make the script unnecessarily complex.

script: Create curtain walls.dyn (32.6 KB)

Yes, consider changing the parameter value after the elements have been created.

1 Like

This works fine when generating multiple elements, if I select one element the offset is applied twice.
Which is very strange, because the Base offset is showing the correct value. :upside_down_face:

Perhaps the base constraint changes? If the base offset is correct as value, there is no way for it to display the geometry incorrectly. Another parameter must influence it.

Unfortunately the constraint is correct, is seems to be some kind of bug…
I’ve make some changes to the workaround. By first remove the Z value from the startpoint, and put the Base Offset after creating the walls it works. Not really the way I would like it…

There is a warning, something about the modeling range. Maybe this could be the issue in the first setup?

Depending on the operation you’re doing I would always set Modelling Range to maximum. But really it depends on the size of the operation.

Also I would apply the Base Offset after the creation. it will help the syntax of things.

Hi Arjan,
Are you satisfied with the result?
If you are looking for a neater solution, perhaps you could set the offset values after generating the element by using the wait for or passthrough node, or use this code: [pass,wait][0]

If the issue is not the base constraint, maybe its something to do with the curtain wall settings/parameters?

Hi Adam,

Yes, setting the Base Offset parameter after the creation fixes the issue. Maybe, like @RevitRobot wrote, this is the best way to get a stable script. Thank you both for your ideas!

1 Like