Warning:element.setparameterbyname operation failed. the parameter is read-only problem

I am writing to ask for your help with an error message that I am encountering while working with Dynamo in Revit. I am new to using Dynamo and have been following some tutorials to get started.

However, I have come across an error message that I am unable to resolve. Specifically, I am receiving the following error: “Warning: Element.SetParameterByName operation failed. The parameter is read-only.”

I created the family myself in Revit and I am certain that the parameter exists inside the family. Despite my efforts, I have been unable to find a solution to this issue on my own.

Therefore, I would greatly appreciate any assistance that you could provide in helping me to solve this problem. I am eager to continue learning and using Dynamo, and any guidance that you can offer would be greatly appreciated.

This is the tutorial video I watched and followed to do this :
(Full Tutorial) Random rotating facade using Revit and Dynamo - YouTube.

Thank you in advance for your help.
family screenshot



problem screenshot

@ilyass.hlioua this is a Revit warning stating that the parameter you are trying to change is Read Only. I know your screenshots show that it is not in fact read-only, so it’s a little perplexing.

Would you be able to upload your family (No need for project) so that I can test? I’ve upped your permissions to do so.

You won’t be able to modify the adaptive component parameters outside the massing editor. Unfortunately, there’s no API for handling the massing editor so you can’t automate this within the project environment.

If you watch the tutorial carefully you’ll see that they’re actually doing this for a massing family (in the family editor). Dynamo should be able to modify the parameters there.

2 Likes

yeah sure, here it is the family and the API, you can use them in any mass and try it as its shown in the video.
random parametric.dyn (12.0 KB)
Random rotating facade.rfa (364 KB)

I don’t know the difference between a massing family and a normal one. but I saw a lot of videos doing the same thing in there projects and it works perfectly. and few newbies in dynamo like me got this problem in comments.
here is some tutories I tried too but ending up with the same problem. [Warning:element.setparameterbyname operation failed. the parameter is read-only problem]

That might be something you want to look into if you’re going to be using massing. You can have an in-place mass or a loadable massing family. They are similar but not interchangeable. You have to use a loadable massing family for the adaptive components to be modifiable in the local (family) environment.

As for your videos, the first one doesn’t show how the massing was created or if it’s even a massing family to begin with so it’s impossible to say what they’re doing. The second video does the same thing as your original link in that it uses a loadable massing family between the adaptive component and the project environment.

1 Like

So is there any way to create a loadable massing family in my project and be able to make the API work on it?
I mean I created the mass family as in the video. the only problem is that I created more than a mass and I deleted them but still shown in the properties.

After a week of struggling, I have successfully resolved the issue I was facing. The root cause was identified as the use of a normal mass in Revit, which restricts the API to read-only functionality. In order to achieve the desired outcome, I created the mass as a family and loaded the curtain family onto it, enabling the use of Dynamo API.

It is important to note that the use of a mass family allows for greater flexibility when working with Revit’s API. By sharing my experience and solution, I hope to assist others who may encounter similar issues and encourage them to consider the family type when utilizing Revit.

In summary, the solution to my problem was to create the mass as a family and load the curtain family onto it before running Dynamo.

1 Like

Hi @ilyass.hlioua FYI can be done with dynamo as well

Actually, I’m still facing the problem. when I load the family in my existing project the API is not working giving me the same error. while I’m creating a Mass family alone and working on it, it works perfectly. IDK how I can load the Mass family to my project and run dynamo without a problem. any hints?

You can’t. You can only modify those parameters in an “editing” environment. That’s not possible in a project due to API limitations and why you have to do it within the family environment.

You would have to use Dynamo to open the massing family, make changes, and then load back into the project.

I totally understand you. but I can’t get the part that I can’t do in my project. while in the videos they are modifying it in the project without any problems.

I don’t know what to tell you. It may be a bug or fix in a later patch, but this just doesn’t seem to work anymore. I can’t say what they did in the video (there’s an edit between running Dynamo and showing the modified result) but Dynamo does not run inside the edit mass transaction from what I’ve seen and tested.

Hello @ilyass.hlioua - Some comments after looking at your content! :blush:

  1. Your “Random rotating facade.rfa” family looks to have some issues inside the Revit family where, depending on the size of it, it’s not going to work as some geometry isn’t locked. Two examples below - a big one, and a small one.

  1. It does appear you have a correctly set parameter when this family is loaded into a Revit project of “angle”. Manually changing this works to rotate your circular disc.

  1. It also looks like Dynamo can correctly set this parameter if its in a Revit project

  1. So if you load the family into a project you can use Dynamo to place those points, and control it’s rotation :slight_smile:

You can see this in this Dynamo graph (Note takes a tiny bit of time to run) where I am taking the z-value of each panel and using that to drive the rotation… less at the base, more at the top!
IlyassHlioua_AdaptiveFamily_Rotation.dyn (307.5 KB)

3 Likes

Thanks for explaining it with details. I want the curtain to rotate as in the video. I tried the API you gave me but it didnt work actually.

also I guess you didnt load the family correctly in the mass, it should be 1m x 1m


here is it a tutorial video showing how it works

(Full Tutorial) Random rotating facade using Revit and Dynamo - YouTube.

I hope you can find me the bug which stops me to do it in my project. like it works in family but not in project as its showing there.

1 Like

I don’t understand that too. I’m sure you know better than me about dynamo as it is my first project. but I already showed the project to my supervisor and he is expecting something like this. and there are also new videos explaining it the same way but they don’t get that error at the end.
you can check these videos too if you can find something I couldn’t notice.

1 Like

To correctly use that red node, you’ll need to download this package :slight_smile:

Go to the menu item: Packages → Search for a Package and type in “Quads from” and you should see this package from @Zach_Kron. When you download that, the red node will work.

Both of those videos are using a massing family to automate the adaptive components - same as the others. They’re not modifying the objects inside the project environment. They’re modifying a massing family and then loading that family into the project as-is. I think that’s the route you need to go.

I have done that but the results looks almost like urs


and thats not what im looking for. I want the ones in my project to rotate

yes, I understand. but they are working on a project at the end with it. like in the first two videos. you can see the whole building which is the project.
I have done the same thing creating a family and it works fine. as long as I load it to my project, the problem pumps up.