Fill a Family instance parameter

Fill a Family instance parameter

mairh_tsek
Collaborator Collaborator
4,922 Views
10 Replies
Message 1 of 11

Fill a Family instance parameter

mairh_tsek
Collaborator
Collaborator

Hello all,

 

Is it possible to fill a family instance parameter with Dynamo. I have one type of family multiple times, and I want each element to have a different value of parameter.

Is it possible?

 

I tried the following but I get an error.

 

Thank you in advance!

 

0 Likes
Accepted solutions (1)
4,923 Views
10 Replies
Replies (10)
Message 2 of 11

bin
Advisor
Advisor

Is the parameter Type or Instance? 
Or maybe add “” to the string? 

0 Likes
Message 3 of 11

onuresen50
Advocate
Advocate
Accepted solution

Hi,

I made a Dynamo script several weeks ago and it was working, I didn't understand what kind of script you want to make but I guess it has similar steps with mine. So maybe you can find what you need in my sample script.

Also rather than a Code Block, you can use a String and don't use " for a parameter name

Hope it helps

0 Likes
Message 4 of 11

mairh_tsek
Collaborator
Collaborator

Thank you, 

 

Rather than Code block I used string and it works.

The parameter is a Family instance parameter.

Message 5 of 11

onuresen50
Advocate
Advocate

Happy to hear it works

0 Likes
Message 6 of 11

mairh_tsek
Collaborator
Collaborator

Just a question, 

 

I noticed after the run of Dynamo, if I go to Revit and delete the value of the text parameter (that came automatically from Dynamo) and after run once again Dynamo, the parameter in Revit remains empty. Shouldn't be filled once again automatically?

Or if I change the parameter name input the second time , in Revit I get the results in the parameterName that I had during the first run and also during the second time. 

 

Thank you! 

 

 

 

0 Likes
Message 7 of 11

onuresen50
Advocate
Advocate

Yes like you said, it should fill automatically again and replace the text each time.

Did you change Code Block to String for value too? or did you change it only for the parameter name?

0 Likes
Message 8 of 11

mairh_tsek
Collaborator
Collaborator

@onuresen50  , 

For the first example It is ok, maybe I missed something.

 

For the second example that I gave :

Image 1 : 'Comment' parameter Name 

if I replace the 'Comments' string with 'Mark ' string and run again Dynamo the result appears in both 'Comment' and 'Mark' - Image 2  

0 Likes
Message 9 of 11

onuresen50
Advocate
Advocate

After running Dynamo once, when you made a change on Dynamo and run again, it makes a new input in your Revit. it doesn't undo the previous input

 

Message 10 of 11

mairh_tsek
Collaborator
Collaborator

Is there any way to undo the previous input?

 

Thank you !

Message 11 of 11

onuresen50
Advocate
Advocate

Nice question, sorry I don't know it also 😅

I will write you back when I learn it