How to Set Parameters for Nested Families from the Project Environment by Dynamo?

Hi everyone,
I’m currently working on a Dynamo workflow, and I need some help with setting parameters for nested families directly from the project environment. Here’s what I’ve done so far:

  1. I created shared parameters using Dynamo and linked them with an Excel file.
  2. I used the Select Element Model node to select instance family => i used “subcomponents” to get all nested families
  3. I applied the AddSharedParameterToFamily node (from the DynaMEP package) to add the shared parameters to the families.

However, I’m struggling with setting the parameter values for these nested families. The SetParameterByValue node doesn’t seem to work as expected in this case.
Questions:

  1. Is there a way to set parameter values for nested families directly from the project environment?
  2. Would Python or C# scripts be necessary for this, or is there an existing package that can handle this process?
  3. If Python or C# is required, could you provide an example or guide me on how to iterate through the nested families and set the parameters?
    Any advice, examples, or suggestions would be greatly appreciated! Thank you in advance for your help.

@truongphudat123 , I have made a similar tool that works well without errors. I just use the basic Get and Set Parameter nodes so I don’t know the cause of your problem. Can you share the script and the model? Or at least a screenshot of the errors in your script? I will try to figure something out.

1 Like

for sure , this is my link to download file dyn
(Microsoft OneDrive)
Create parameter in project