Adding Shared Parameters based on Family Type

Hello all –

I have a topic that I’ve struggled a bit with, to which I hope that someone in here could help me grapple.

So, here goes;

I want to be able to have a Shared Parameter file, which has all the groupings corresponding to all the Family types. This, I have created. When adding a Shared Parameter manually, I need to select the category / grouping, and then add the parameter. This, I can skip by using the Orchid-package (@erfajo), which is great.

Now, I want the Dynamo-definition to go in, read which Family-type it is that I am working on (is it a Door, is it a Window, is it a Furniture, is it a Mass, etc.), and then go in under the corresponding, grouping in the Shared Parameter-file, and add all of these Shared Parameters.

So, I’ve managed to extract the Family-type of the current / open Family, i.e.; Door, Window, Furniture, Mass, etc.), as a String. How can I use this String as a “selector” for my Shared Parameter-category, without having to do it manually, which, experience-wise, could be pretty error-prone?

Is this even possible? This could be a nice way to keep all the Shared Parameters in one file, and then, by just running the Dynamo-definition, I can add all of the written Shared Parameters under a specific category, to the current Family.

I hope that this makes sense?
Thank you so much in advance.

All thoughts are appreciated, and please see attached definition to this post (which, by the way, should come with a “quite-messy”-warning, as I’ve been trying out a lot of stuff).

Cheers!

/Claus

DYNAMO - ADDING SHARED PARAMETERS BASED ON FAMILY-TYPE.dyn (215.5 KB)
SHARED PARAMETERS.txt (21.3 KB)