Element.SetParameterByName operation failed The parameter is read only

Hi Guys,

I am new user for Dynamo.

I have created Dynamo scripts to rotate custom created louvers by mass and curtain based panels according to sun path direction

But if I run my dynamo script, I keep getting warning ‘Element.SetParameterByName operation failed. The parameter is read-only’ is appearing at node ‘Element.SetParameterByName’.
Also the panels do not rotate in the revit view

Kindly advise.

Thank you in advance for your co-operation.

The panels themselves cannot rotate because they are hosted. You need to rotate the host geometry/reference.

How do I do that

You would need to get the host from the panels and then apply your rotation.

Do you mean I have to manually rotate each panel before using dynamo to automatically rotate

Think of how a door gets hosted to a wall in Revit. You cannot place or later rotate a door outside of that wall once it’s hosted. You would have to rotate the whole wall. It’s the same thing with curtain panels. They are driven by their host or reference object. You can’t rotate the panel because the panel is derived from the mass. You would have to rotate the mass itself.

You should be able to get the host object from the panel with Dynamo. Then you could use Dynamo to rotate the host itself, which would also rotate the panels.

So how do I get the host panel from dynamo and use it to rotate it in dynamo

That’s where you’re going to need to put in some effort and research yourself. We’re happy to help out and answer questions here but this forum is not for asking other people to do your work for you. I’d start by looking and the properties and parameters in Revit then possibly the API. You can also try Google and other forum posts for similar topics to get a starting idea.

Thank you very much

1 Like