Bulk replacing type parameter to instance

I am trying to bulk replace type parameter to instances. I am modifying a script I found on the forum. (Change Family type parameter to instance parameter - #4 by Nick-H)
As I am new to Dynamo, I tried to arrange a new script with no avail. Would anyone be able to locate my mistake?

Thank you for any help!
(IN CONSTRUCTION v.1) Bulk type parameter to instance parameter.dyn (28.4 KB)

Verify that the names of your families contains EDT as you have in your code block. I changed it to .rfa as shown and the script ran through.

However, the FamilyParameter.MakeInstance node did not change the parameters. It could be, that node only changes parameters in the active document. And even though the families are being opened, they are not becoming the active document, so the parameters are not being found and changed.

1 Like

Thank you for the typo!
I just tested it and it does indeed only make the changes in the active document. Like you said the other documents are being saved without modifying any parameters.
Do you know a way to solve this issue? I have the same issue on multiple scripts.

I also did not connect the flow.wait.for to the right node. I corrected it in this.

You received a couple of True returns in your last run, so did it not change those two parameters to an instance? If not, then I have to assume it’s something with the coding in that node. If that’s the case, then it’s getting a little beyond my realm. I have only started scratching the surface with python and the Revit API. Hopefully someone else can shed some light on this.

BTW, make sure you filter out backup files from your list. Otherwise, the script will open and run on those as well.


It did work but only in the active family. The other files in the folder were opened and saved but not modified. Thank you for your help nonetheless!

I’m hoping it might be an issue with the Orchid Package as I just noticed I get a “Dynamo.Exceptions.LibraryLoadFailedException: Failed to load library.” Warning. I am currently trying to fix this.

Open the families rfa files in the background

Doesn’t the script already do that with Family.Doc.Open and Family.Doc.close ?

I respond without seeing any code :confused: i guess the rest of task nodes must handle documents opened in the background, not just the active opened file

Hello @narnar something here should work in your case,

(IN CONSTRUCTION v.1) Bulk type parameter to instance parameter.dyn (34.1 KB)

or a way with birdtool multiplayer…

birdtool(IN CONSTRUCTION v.1.dyn (19.5 KB)

1 Like

Generally my Crumple nodes dont play that nicely with others unless you get the levels structures to suit other nodes. I’m typically sending outcomes from my nodes as a list of lists, so sometimes you might need level 2 or 1 to make it suit other nodes assuming they work.

1 Like

Yes think it could work with the Crumple package as well… :wink: :wink: think its just list level

Thank you @sovitek for the solutions! Using birdtool multiplier is such a great alternative. I had no idea it existed and it simplifies the future codes I’ll have to script.

Your script has a lot of custom nodes haha. It’s a lot to intake for a beginner like me.

I appreciate your help, thanks lot!!

1 Like

Hi, I would like to revive this thread. The new clockwork extension doesn’t include the FamilyParameter.MakeInstance nor the FamilyParameter.MakeType (unless something is wrong with my dynamo). Does anyone have another solution to change a type parameter to an instance parameter? Gracias!

Hi , Could you please post a screenshot of the graph? We’re not sure where the issue is coming from. Make sure all nodes’ preview bubbles are pinned.

Hi @free i dont use clockwork in that example but guess he have similar nodes…this one here is from openmep package and can be downloaded from here…

1 Like