Set element parameter back in Revit

Hi,

@Vikram_Subbaiah @Mostafa_El_Ayoubi @Konrad_K_Sobon @Daan @Giovanni_Brogiolo @Drbohlav @JCoronado @Sean_Fruin @awilliams, Can you please help?

I have modeled a panel in a pattern-based generic model family, then created a mass using In-place mass inside a project template, finished the mass Mode, and finally, I tried to set parameter value for the generic model parameter but failed, the error says Parameter is Read-only, the Parameter is instance parameter, and the family is shared.

I am using Revit V2020.2
& Dynamo V2.3.5

Here is a Screenshot of the project

Thanks a lot,

The error says it all. If the parameter is read-only then it’s not possible to Set.

2 Likes

Hi @Kulkul,

I appreciate you taking the time to answer my query, I am aware that the workflow I have followed will always generate that error, and I was wondering if somehow there is a script (Python…etc.) has been developed to access the family instances parameters, or maybe someone can provide a different workflow as a workaround for this problem.

The only solution that I could think of is to associate the parameter I want to set for every instance (Panel) in the curtain grid with a new parameter in the project environment, which I believe is a non-practical solution since I will have to create over 100 parameters for this element.

This is maybe the 5th family I have worked on so far, I have tried a couple of options including an Adaptive component family inserted in a pattern-based generic model, so I won’t mind a different workflow with extra effort.

Regards,
:rose:

You will need to place the panels outside the mass by selecting the mass surface and creating a grid and grouping of Adaptive Component Vertices in Dynamo.

panels.dyn (44.4 KB)
panels

pnt01 = srf<1>.PointAtParameter((0..1..#(h*2)+1)<2>,(0..1..#(w*2)+1)<3>);
pnt11 = List.DropEveryNthItem(List.DropEveryNthItem(pnt01<1>,2,0)<1><2>,2,0);
pnt12 = List.DropEveryNthItem(List.DropEveryNthItem(pnt01<1>,2,1)<1><2>,2,1);
pnt13 = List.DropItems(List.Sublists(pnt11<1><2>,0..1,1)<1><2>,-1);
pnt14 = List.AddItemToFront(pnt12<1><2><3>,List.DropItems(pnt13<1>,-1)<1><2><3>);
pnt15 = List.AddItemToFront(pnt12<1><2><3>,List.DropItems(pnt13<1>,1)<1><2><3>);
pnt21 = List.DropEveryNthItem(List.DropEveryNthItem(pnt01<1>,2,1)<1><2>,2,1);
pnt22 = List.DropEveryNthItem(List.DropEveryNthItem(pnt01<1>,2,0)<1><2>,2,0);
pnt23 = List.DropItems(List.Sublists(pnt21<1><2>,0..1,1)<1><2>,-1);
pnt24 = List.DropItems(List.RestOfItems(pnt22<1><2>)<1><2>,-1);
pnt25 = List.AddItemToFront(List.DropItems(pnt24<1>,-1)<1><2><3>,pnt23<1><2><3>);
pnt26 = List.AddItemToFront(List.DropItems(pnt24<1>,1)<1><2><3>,pnt23<1><2><3>);
pnt27 = List.Flatten([pnt14,pnt15,pnt25,pnt26],3);

Hi @Vikram_Subbaiah,

I am really sorry for the late reply, I already know that your solution will work since you have suggested placing all the components in the Project Environment, but I am just waiting to try your solution myself before hitting the solution button (I know I will). What I like most about your solutions is that you prefer sticking to the OOTB nodes… many many thanks for your effort and time :rose: :rose:

For the members who is facing the same problem & have stumbled on this post, if you prefer using the Packages try using “Orchid Package: (Parameter.Associate) Node”, or a Python Script done by @awilliams

the bad news is that the Python script above was done in 2018, so I am not sure If it works with the recent Revit API, so I guess someone will have to modify it.

I haven’t had the time to try any of these solutions above, when I have time I will definitely try them all and give my feedback/update on this post.

Best of luck for all of us.
:rose:

1 Like