Replacing families in project from file

Hi all,

I’m trying to write what I believe to be a pretty straightforward graph. I have however ran into a little roadblock in Dynamo. What I would like to do is replace families within a project that aren’t loaded into the project.

I’ve got something working however when I run it, it only updates 1 instance of the elements within the project. If anyone has any suggestions on what may help here that would be great.

Make a list of strings in a code block.

  1. Select all of the families you need to load to the project in the File Explorer
  2. Shift+Right Click the files and select Copy As Path
  3. Paste it in a text editor a replace all backslashes to double backslashes
    (CTRL+H or CTRL+D it depends…)
  4. Paste it into a codeblock and made a list from it.

You can easily load large amount of families like this :slight_smile:

1 Like

Hello another way from directory…

Thanks for getting in touch guys, both of those will come in handy.

However the issue I have at the minute is that when I try to replace the families that are loaded in the project it doesn’t replace all that are placed.

In the initial screenshot I took there were 3 light fittings and when I loaded it in and tried to replace the 3 fittings it only replaced one.

Would you have any theories why it doesn’t do all 3? Or is this just another over my head dynamo thing :joy:

This node doesn’t update the family (as it’s name state) but load it.
I’m assuming you want to load and update if the family is already loaded right?

As for the 3 instead of 1 it’s a matter of lacing, set it to longest.

1 Like

Assuming this is a repeatable process I would use an Excel file with column A being the replacement target by family/type name, then use Family by Name and Type Name to retrieve it as a list. Column B would be the reload target path.

@davidvadkerti . I’ve used shift+right click alot, but never thought about trying to paste it into a codeblock.