Archilab Rename Files Error

Hi All!
I am trying to remane pdf with Archilab nodes but there must be something wrong and I dont know what to do…I am new here and I don’t know where could be the problem


I am getting this error: ‘WindowsError: [Errno 17] [Errno 183] Cannot create a file when that file already exists.’ and the solution given in this post (Archi-lab Rename PDF Errno 17) doesnt work for me as I have two steps: one for printing (which works) and this one.
I am using Revit 2017.3 and dynamo 2.0.1.5065

Thanks in advance!

I think Orchid package has also a node to rename files

Did you watch this topic to modify the custom node if archilab ?

Hi @Alban_de_Chasteigner, thanks for the reply but the Orchid package seems to be empty
image
And I should be missing something as I don’t know how to use the topic you mention for my problem.
Thanks

Use the node saying “install or update orchid” in there is instructions on installing the package… (which should be pretty self explanatory)… remember to follow the instructions in the package…

You can replace the custom node in archilab package with this one :
Rename Files.dyf (5.1 KB)

C:\Users\YOUR NAME\AppData\Roaming\Dynamo\Dynamo Revit\1.3\packages\archi-lab.net\dyf

2 Likes

I can’t see how many “Identifiers” and “NewNames” you have.

The 2 lists must be the same length.

1 Like

hey, thanks! I replace the custom node and that error is gone :slight_smile: now I am working on the “NewNames”. As you noticed, it is not right. I know it didn’t have the same lenght but it was working. I thought that as the strings with “-” were covered it was ok. I want them as separators. The length of the empty ones it is the same. Now it is not working anyways.

I’m totally lost.
I can’t help you if I don’t see in a picture what the identifiers and NewNames look like.

You have nulls under the list.combine node so yes it’s the newNames that give you the error.

The problem is probably the String.Concat node because there are 13 inputs on List.Concat and only 6 inputs on List.Combine.

List.Combine works like this :

1 Like

I am working in that direction now so that is fixed now.


To make it more simple in order to know what the problem is I am using a “select model element” for the sheet number. So I am getting just one result instead of a list in case that helps.
I think the problem is the identifier

I printed the pdf including “1362” on its name (sheet number) and the identifier should find this number (index 83 in the picture) and know that that is the file to rename but for some reason it says “cannot create a file when that file already exists”

You’re inputting 84 identifiers and only one NewNames so the node Rename try probably to rename 84 times the same file.

If you want to test with one pdf file, write “1362” in a code block and connect it to Identifiers.

1 Like


No error now but this is what I am getting in my desktop: 3 files with no format
image

Can you add a list.create node after the code block “1362”.
The node is probably waiting for a list and not a singleton.


Nohing changes, It deletes the pdf that includes 1362 on its name but creates a file or files with no format again with just one letter on its/their name.
Again the “could not find a part of the path”

It works perfectly with Dynamo 1.3

Indeed with Dynamo 2.0, the custom node needs another modification :

2 Likes

@Alban_de_Chasteigner

No auto??
Why??

Ok it seems to work with Dynamo 2.0 now.
Can you replace the old node with this one ?

Rename Files.dyf (8.5 KB)

Please note the level 2 on identifiers and NewNames.

4 Likes

Thank you very much. It works pretty good! It is the first script I have tried. Looking forward to continue learning with dynamo :wink: