Replacing the path of a material texture

Hello all,

I’m trying to create a Dynamo script that replaces the path of a texture.
My case is as follows. We’re an architectural firm. Some of our assignments are “secret” at least until an official assignment is given. These projects are placed on a seperate section of our server not everyone can access. So when an assignment is given the folder is moved from hard drive to harddrive. Our problem is that when this happens, Revit seems to lose the path of textures. What im trying to achieve is a script where you define the location of the new textures and the script updates the paths.

I’m using GeniusLoci. Revit 2019.
Attached my script the file I’m attempting to alter and a picture of the script.

Test vervangen material.rvt (3.8 MB) Texture path.dyn (44.7 KB)

I’ve used some posts on this forum as inspiration. My problem seems to be in the last node from GeniusLoci where the path should be written back to the material.
I hope someone can help me with my script.

Hi @h.bakkerPE58B,

Welcome to the Dynamo Forum.
If I create a new material, add a texture and remove the texture of the folder, it seems to work as expected.

Before:

After:

Thank you :smile:

I’m trying to replace just the path, not the full texture. So the name of the texture stays the same, only the path has changed.
But perhaps something is wrong with my Dynamo or the package installed. I will try to reinstall the package.

Hello Alban
Did you find out, how to just replace the path?
Best regards, Henriette