Add Shared Parameters to Families - Wrong Parameter Group


I’m tring to add some shared parameters to a list of families loaded in a project file, using a python script similar the one at the following link:

Here is the code:


Unfortunately I realized that the parameters are correctly added to the family, but in a wrong parameter group.

Doesn’t anyone know the reason why this happens?


As written in the post this was rightfully split from…
Why not use some of the nodes that are available? either the OOTB nodes for projects or the nodes in Orchid for families?


Thanks for your reply!

Well, my purpose was to manage 3 task directly in the project file where the families are loaded, feeding the node only with an xls file.

The workflow follows 3 steps:

  1. create some shared parameters in the shared parameter txt file --> DONE
  2. add some shared parameter to all elements of certain categories in the project --> DONE (here I can add the parameter in the right parameter group too!)
  3. add some shared parameter to some families, loaded in the project --> WORK IN PROGRESS!!!

Refering to point 3, I already try your node “FamilyDocument.AddSharedParameters” and I have some question to point out:

  • I can create and/or add shared parameters to the shared parameter txt of the “dummy project file” at the same time;
  • the parameter is added in the right parameter group;
  • the node work fine with list of families;
  • the modified families are not reloaded in the project file;
  • it seems that it doesn’t work whit list of parameters;

Are my previous statement correct?

Here you are some screenshot of my tests.



Can you please share your script in order to find all together a solution?

Here you can find a WIP version of the entire workflow, with the dynamo nodes and the xls file.

mR_CreateSharedParameters - 0.1.xlsx (24.3 KB)
mR_CreateSharedParameters - 0.1.dyn (39.9 KB)

Your attached .dyn files doesnt cover what you show in your images. Please upload the proper files if you want help.

Here you are the dynamo nodes related to the images, but I think is more useful (not only for me) to discuss about the whole workflow…

TEST05.dyn (15.8 KB)
TEST04.dyn (11.0 KB)

try something like this

TEST06.dyn (17.6 KB)

…and here you are the dyn related to the very first image.

TEST02.dyn (7.0 KB)

Thanks for your help…I’ll try to follow your advice on Monday.

I actually saw a potential for a new node while doing this… new version of Orchid is available
130.1.02/200.1.02 include now “Family.GetFamilyDocument”

TEST06.dyn (19.0 KB)

1 Like


I tested the first “TEST06.dyn” you uploaded.
Here you are a modified version:
mR_TEST06-1_by erfajo.dyn (10.6 KB)

Well, as usual I have some question to point out:

  1. something strange happens when I use the “familytype.getfamilydocument” node:
    IN = N°3 familytypes --> OUT = N°9 family documents
    Is it normal?

  1. I tried to feed all inputs of the “FamilyDocument.AddSharedParameter” node with some lists.
    I realized that:
  • parameter name and parameter group works as a corss product lacing: I obtained N°4 shared parameters in the txt file;
  • type, group and instance takes only the first item of the list, in fact all parameters are “numbers” and have been added to the family into “model property” group as “instace” parameter.

I expected something like this:


  1. I get this strange error, but everything seems to work anyway.
    “The referenced object is not valid, possibly because it has been deleted from the database, or its creation was undone.” Can’t anybody explain this?

Finally, the reason why in my work in progress “mR_CreateSharedParameters - 0.1.dyn” I decided to divide the 3 tasks (create shared parameters, add to categories, add to families), is to reduce the possibility of input mistake.
In adding shared parameter to categories or families, I’d like to feed the node only with family list, parameter name and parameter group, the shared parameter has been created first and alredy has a type, group and “instance boolean” (unique for categorie!).

What do you think about???

And another question, maybe I miss something: how do you solve in your script the wrong parameter group issue???

Thanks for your help.

First, familytype is how many types there is in the family. Thats why I made the new (Family.GetFamilyDocument) node that takes “only” the family, see my latest post.

My node works as the OOTB node for adding shared parameter, which should tell you that you can’t add a list to other input than the parametername. Add the number of nodes for those parameter group/type you need to add.

There is no need for dividing you job into several graphs… my nodes are made in a way, so you pass the “documents” around in a chain and close them in the end. On the way, you can use all my familydocument nodes doing whatever you need to in one run (if connected in the right order).

I don’t understand what you mean with how do you solve in your script the wrong parameter group issue???. Is it, what if the parametergroup doesn’t exist?, in those cases, the node create the missing in the shared parameter file, exactly as the OOTB node does.

I refer to the question I explained in my first topic. With my script all parameters are added in the parameter group “Other”.

I see you solved the problem in your node “FamilyDocument.AddSharedParameters”, so I’m asking you what’s the mistake in my script and possibly what’s the solution. :slight_smile:

Please see the first image I publish and/or "mR_CreateSharedParameters - 0.1.dyn.

Unfortunately I can’t use your node because I have to manage a very big list of families and parameters, and I would not create a very big graph. I prefer using python to create a sort of general node, where the only input is the xls file.

Thank you again.

So you will not use the provided nodes? then I will let someone else try to help you.

…so your philosofy is: “If you use my node, then I will help you”. ?? :face_with_raised_eyebrow:

Sorry but as I show you before, actualy your node can’t do what I need.

So thanks for your help, but it seems like you want to keep the secret about the method you used to add the parameters in the correct parameter group.

Anyway, I thought that this was a place where to share information and try to develop something useful for all the Dynamo community. Maybe I’m wrong.

You got a solution, but you dont want to use it as I understand. Thats entirely up to you. I started asking, why dont use nodes there is provided. I didnt wrote I want to solve your coding issues.

OK let’s try…maybe I can’t understand.

Please, let me see how can I solve the following problem using Orchid nodes.

In the following excel there is the list of families and parameter I would like to add.

Orchid_AddSharedParameters.xlsx (16.8 KB)


…coming back to the real topic: doesn’t anybody know what’s wrong with the script in the first post??

I don’t really realize why the parameter are always added in the parameter group “Other”…

@erfajo Hello, where is the familytype.getfamily document from? is it from Orchid? i got orchid package but did not find it. please help!