Set a parameter value inside a family document, for all types!

Hello there. I have some trouble using Python in Dynamo in a family document.

I am currently working on a family issue : I’m trying to build a Python script that will execute two tasks : first one is to create parameters (from a shared parameter file) in the family properties. I took care of that by using a dynamo block I found somewhere in a package - It works well. I use the “Dyn_SharedParamTesting” package.

Second task is to set a value for a type parameter, inside of my family document. It can work using this python command:

DocumentManager.Instance.CurrentDBDocument.FamilyManager.Set(par1,param_value)

with par1 in the list DocumentManager.Instance.CurrentDBDocument.FamilyManager.GetParameters()
and param_value the value I want.

My very issue is there : the parameter value is only set for one type of the family (which makes completely sense). I’m also trying to change the actual type of the family within the open document in the python code. I can not find the right command to do so. My actual python code is the following :

Inside the current document (which is a family), i’m trying to change the type of the family. Can you help me?

I’m also open to any idea to achieve some family parameter creation and setting…

Thank you for your time.

Julien

Search for set formula I hope then that you find where your looking for.

Jan-Willem

1 Like

I suggest having a look at the Orchid Package @erfajo, as this package as lots of the functionality you are asking about.

2 Likes

Thank you.

Hi,
I would like to know if Dyn_SharedParamTesting is still available somewhere. Personnaly, I couldn’t find it. Could you please post a link? Thank you.