Shared parameter is Read-only error in Element.SetParameterByName node

Hi, first time poster here.
I`ve made a dynamo script to fill out parameter values on elements from a workset that has this parameter. I noticed that in my troubleshooting and figuring out how this could work that i created some parameters as Project Parameter, but others was imported Shared parameters with the same settings.
Now i get an error running the script and i found taht it is the Shared Parameter that is the cause of this as i removed the “Skole” shared parameter and Added a Project Parameter with the same name and settings, and rthat removed the error.
My question is, can i remove this error while using shared parameters.

@tmagga83
It looks like you have set this parameter to all categories.
If thats the case, it would also include views.
And you mention worksets aswell.
Could it be that a co-worker has openened a view and therefore you cannot change the parameter value?

I have set the parameters to all categories intentionally. But it doesnt seemt to be set to vies as the vies is not created in my workset.
This was made to a project that is now done, but i keep building on it, so the project is detached from sentral file, but keeps the workset as it was.
I use List.FilterByBoolMask to filter out elements that does not contain the parameters i have, and results are showing that it does fill out the parameters as intended, i just dislike the error.

Could a formula controlling any of them? That can throw a similar error…

Can you share a small Revit file (say a file with one wall) that reproduces the error?

I checked that possibility, and its not.

It does not appear to reproduce the error on a new small rvt using the same parameter setup

I found a workaround. I removed the shared parameter, and then added the same parameter and checked all categories, ran the script and its working perfectly, it fills out the parameters of the elements in a selected workset if the element has the parameter.
Thank u for the replies.

Still curious about the reason for the error though.

Thanx for the welcome, although i`m not a dane :yum:
Close though, just a tad north.

No, i did not have 2 parameters with the same name. Not sure what happened.

The worksround was to remove the shared parameter, and the add the same shared parameter again, then run the script, no errors. So unless it doesnt appear again, i wont be looking deeper into it at this time.

Thnx for the answers.

yes, sorry for that
i dont have revit here at home so i can’t help

It got solved by a workaround. Will start learning basic python later this winter, might help later on. Tahnx again to all of u

Hello,

I have the same Issue with a parameter that is applied to Views and Sheets. I just asked myself if the issue could not come from the fact that the View templates can “Lock” a parameter for a set a views …
In my case, that’s a excpetion I would like to ignore but the error seems to stop the process of setting values …