Change Length of Railing

I’m trying the change the sketch line length but I’m getting an error. Any ideas?

You are parsing a curve not an element :slight_smile:

Thanks. Can I turn a curve into an element? Or just change the curve length?

You need to pass a element which should have it’s length changed, if in doubt give the dynamo primer a read :slight_smile:

The element is from your ‘‘all elements of category’’ should go into the change of location node.


I’m getting an error when I do that…
‘Warning: Element.SetLocation operation failed.
The location of the structural element is not a valid curve.’

btw. What is the ‘Element Shock’ that you referred to?

Unfortunately, the Revit API does not have any options for editing or replacing an element’s sketch. Your only option is to delete the old sketch based elements and replace them with new ones.

Thanks for clarifying Dimitar. I tried to create railings based on new curves but I could not find a railing create node. Does the API allow for that? Maybe I could access through Python?

Revit 2017 added a new railing creation method that will accept curves. You can use that as a starting point:

1 Like