Add parameter value to stacked wall members

Hi, how can I add parameters values to stacked walls members ?
I did some code to acces to them but when I use set parameter value by name it retrieves a mesaage saying “read only parameter”
My only choice at moment is to select the stacked walls one by one and then use the “break up” tool in revit. but i have to do this everytime i recieve the model from subcontractors, and sometimes those walls had hosted elements like plumbing fixtures wich lost their host with the break ups tool!
Tell me if i have to write this question in another section
thanks, from chile.STACKED_SELECT.dyn (16.6 KB)

That’s unfortunately a Revit limitation. Once elements are combined into a stacked wall, its parameters become read-only. There’s no good solution to this, as stacked walls can only be manually broken up (although, as noted in one of your much older threads, you can copy the stacked wall’s constituent elements in place and then delete the stacked wall). Although this may solve your read-only parameter issue, maintaining the element hosts is a much more difficult problem.

As you can’t change an element’s host through the Revit API after it has been created, the process becomes a lot more complicated. Here is a rough outline of what I would attempt to do:

for each family instance in family instances:
    get host of each family instance

for each stacked wall in stacked walls:
    copy all stacked wall members
    determine if stacked wall is a host for one of the family instances
    if the stacked wall is a host: 
        create a new instance of the family using one of the stacked wall members as its host
        take all parameter values from the original family instance and set them to the new instance
        delete the original family instance
    delete the original stacked wall
1 Like

ok. let me try it thanks