Create Type Parameters in Dynamo

Hi everyone,

I have searched for this topic and a did not find any practical response to this question. So to the dynamo experts, there is any way to create type parameters in dynamo to be editable in Revit? If yes, how?

 

Best regards

Hello,

Check out the “ElementType.Duplicate” node from Clockwork. Once you generate the new types, you can set their specific type parameters with the “Element.SetParameterByName” node.

Hi Dimitar, thanks for the reply. It’s not quite that what I want to do. That node creates new family types… I already have the family types that I want in Revit. My goal now is to create for each family type new type parameters (not project parameters) that doesn’t exist.

Oliveira

Have a look at this recent thread: http://dynamobim.org/forums/topic/add-parameters-to-family-instance/

Hopefully it does what you are looking for. You will need to be inside the Family Editor to do this, not sure if there is a way to add Type parameters that are not project/shared from the Project environment.

 

Sorry, I misunderstood your question. As long as you’re already inside the family document, you could try the following quick example:

If you’re trying to do this from a project file, continue searching the forum (the solution is there already) or ask on StackOverflow :wink:

1 Like

Dimitar, I did what you posted but probably I did some dummy mistake. I’m new at this…

I have a family document open in Revit.

 

Looks like you opened the family file after launching Dynamo in a project file.

Dimitar

Thanks for this :slight_smile: Works perfectly!

Quick question, is it possible to feed in a list of parameter names to this node to create multiple parameters at once. Also to specify the Group and type of each parameter being fed in?

Ive used the definition from the post i posted about int his thread to add in shared parameters etc, but im not sure if similar code can be used inside the Family editor?

 

 

Hey Dimitar, per your request, I’ve created a post on Stack Overflow to tackle editing a Family Document within a Project Document. See this link: http://stackoverflow.com/questions/35513566/revit-api-dynamo-creating-a-family-parameter-from-project-document

Alisder,

It’s possible but both I and others have already shown that many times in the forum. You could either search in the forum or check the great python examples inside node from Clockwork or Archi-lab. I always try to keep the code that I post to a minimum - this site makes any code sniplets unusable and the only other alternative, images, is hard to replicate.

On your second question, Konrad’s node uses the shared parameter file to get the internal definitions for the parameter group and type. That might be hard to do for family parameters because you’ll need a shared parameters file that has every possible group and type. What you could do is check out his nice drop-down nodes for the correct parameter group and type names and convert the string to the corresponding internal element like so:

I am trying to replicate this, and saw the post from the Stackoverflow but the Python gives me an error. Suggestions? Thank you.

@Dimitar_Venkov,
Hi,
Am also trying for multiple parameters at once and according your advice i searched a lot in forums as well python nodes for writing new parameters to family/s but maximum deals with the existing parameters and their values to write to the project doc or to the shared parameter file. Your quick python for adding only one parameter to a family is great, i loved it…but please give me a link for multiples to family/s as am unable to find out such. Also, if you develop code snipplets for new multiples that is big enough to post on dynamo forum, could you please email to vabuk2013@gmal.com or upload in txt format to a box site for everyone s use ?

@Dimitar_Venkov
Again Hi Dimitar,
Is it possible to incorporate Loop While or For Loop method in your quick python example for the single parameter to turn it into a node for multiple parameters so that it will write a list of parameters until the loop is finished?
Am very poor in coding…so please somehow make it possible for multiples.
Thanks in advance.

Hi,

Whenever you want to reply to someone only name is not enough. You need to type “@” sign in front.
For example: @Dimitar_Venkov

Hi,
Thanks…i forgot to add.

@Dimitar_Venkov

Hello Dimitar,

I red your post:Revit API & Dynamo, Creating a Family Parameter from Project Document in this theme, and I followed this code, and it works, thanks! But I have a lot of model in place familes, and I’d like to add new type parameter to them, and this code don’t able to add since this family is in-placed and is not supported for editing. Could you tell me how sholud I amend the python code to can add param to the model in place family?
I got this warning:

thanks. Tom

Hi @hillversum,

I just saw your email. Sorry to be the bearer of bad news, but last time I checked, in-place families are not exposed through the api and can only be changed through the Revit UI.

Hello,

thanks for reply! It would have been very usefull. :slight_smile: