# Reload Upgraded Revit Links

**URL:** <https://forum.dynamobim.com/t/reload-upgraded-revit-links/36981>\
**Category:** Revit\
**Created:** [June 11, 2019, 9:15am UTC](https://forum.dynamobim.com/t/reload-upgraded-revit-links/36981 "2019-06-11T09:15:57Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Revit\_Noob](https://avatars.discourse-cdn.com/v4/letter/r/a587f6/32.png) [@Revit\_Noob](https://forum.dynamobim.com/u/Revit_Noob)\
**Post date:** [June 11, 2019, 9:15am UTC](https://forum.dynamobim.com/t/reload-upgraded-revit-links/36981/1 "2019-06-11T09:15:57Z")

</div>

Based on this question :

> [@Reload Multiple Revit Links](https://forum.dynamobim.com/t/reload-multiple-revit-links/36801/11):
>
> Hi, This new issue isn’t related to your original subject and the use of the Repath RevitLinkInstance node and is now a matter of managing lists of filenames. I’ve already solved your original problem so start a new topic and I will show you how to answer this new question.

We recently upgraded our Revit Version from 2017 to 2019.

We commonly put the version of the revit in the filename itself, so Filename-R17 now become Filename-R19.

I need to reload all my revitlink instances to the new filename.

Both the old and the new filenames are in the same directory,  
any idea how to do that?

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [June 11, 2019, 9:19am UTC](https://forum.dynamobim.com/t/reload-upgraded-revit-links/36981/2 "2019-06-11T09:19:26Z")

</div>

Hi @Revit_Noob,

If I understand correctly, you need to modify the strings (filepath) to match the 2 lists (R17 and R19).

 ![Repath%20RevitLinkInstances%20R17%20to%20R19](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/5/15ee20a2ac6036a5cd0116ac1957237b297ca1d8.png)

[Repath RevitLinkInstances R17 to R19.dyn (28.2 KB)](https://forum.dynamobim.com/uploads/short-url/rImVhbrwq3Wo4QPilVm3wpgqkHB.dyn)

---

<div class="post-metadata">

**Author:** ![Revit\_Noob](https://avatars.discourse-cdn.com/v4/letter/r/a587f6/32.png) [@Revit\_Noob](https://forum.dynamobim.com/u/Revit_Noob)\
**Post date:** [June 11, 2019, 9:29am UTC](https://forum.dynamobim.com/t/reload-upgraded-revit-links/36981/3 "2019-06-11T09:29:42Z")

</div>

what if i have varying string length of filename?

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [June 11, 2019, 9:36am UTC](https://forum.dynamobim.com/t/reload-upgraded-revit-links/36981/4 "2019-06-11T09:36:22Z")

</div>

If your Revit files doesn’t finish with “R17.rvt” or “R19.rvt”, it will not work.  
To automate, you need common characters in the filenames.

---

<div class="post-metadata">

**Author:** ![Revit\_Noob](https://avatars.discourse-cdn.com/v4/letter/r/a587f6/32.png) [@Revit\_Noob](https://forum.dynamobim.com/u/Revit_Noob)\
**Post date:** [June 11, 2019, 12:09pm UTC](https://forum.dynamobim.com/t/reload-upgraded-revit-links/36981/5 "2019-06-11T12:09:14Z")

</div>

regardless of how long the filename?

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [June 11, 2019, 12:16pm UTC](https://forum.dynamobim.com/t/reload-upgraded-revit-links/36981/6 "2019-06-11T12:16:58Z")

</div>

Please show a picture with your issue.  
The _String.Remove_ node start at the end of the filename so the number of characters doesn’t matter.

---

<div class="post-metadata">

**Author:** ![Revit\_Noob](https://avatars.discourse-cdn.com/v4/letter/r/a587f6/32.png) [@Revit\_Noob](https://forum.dynamobim.com/u/Revit_Noob)\
**Post date:** [June 11, 2019, 12:21pm UTC](https://forum.dynamobim.com/t/reload-upgraded-revit-links/36981/7 "2019-06-11T12:21:17Z")

</div>

i see…i am already home. I don’t have revit / dynamo now.  
Will check again tomorrow. Thanks @Alban_de_Chasteigner

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [June 11, 2019, 12:52pm UTC](https://forum.dynamobim.com/t/reload-upgraded-revit-links/36981/8 "2019-06-11T12:52:23Z")

</div>

String.Replace(filename, ”-R19”, ”-R17”);

This will have the added benefit of not changing file names which didn’t have the “-R17” indicator (and therefore have no “-R19” indicator).

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [June 11, 2019, 1:25pm UTC](https://forum.dynamobim.com/t/reload-upgraded-revit-links/36981/9 "2019-06-11T13:25:28Z")

</div>

@jacob.small’s proposal is smarter.

 ![Repath%20RevitLinkInstances%20R17%20to%20R19](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/c/0ca5b23738af01389972903374a34b8e130b5c46.png)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [June 11, 2019, 1:42pm UTC](https://forum.dynamobim.com/t/reload-upgraded-revit-links/36981/10 "2019-06-11T13:42:53Z")

</div>

Even a blind squirrel and a broken watch. Seriously though without the rest of the code a String.Replace node doesn’t get us very far.

---

<div class="post-metadata">

**Author:** ![Revit\_Noob](https://avatars.discourse-cdn.com/v4/letter/r/a587f6/32.png) [@Revit\_Noob](https://forum.dynamobim.com/u/Revit_Noob)\
**Post date:** [June 12, 2019, 5:36am UTC](https://forum.dynamobim.com/t/reload-upgraded-revit-links/36981/11 "2019-06-12T05:36:12Z")

</div>

Question, what lacing option is needed for the List.AllIndicesOf and other nodes?

I am using 1.3 version.

I’m getting wrong index in the List.AllIndices Of node.

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [June 12, 2019, 6:33am UTC](https://forum.dynamobim.com/t/reload-upgraded-revit-links/36981/12 "2019-06-12T06:33:36Z")

</div>

Can you show a picture with previews under the nodes ?

---

<div class="post-metadata">

**Author:** ![Revit\_Noob](https://avatars.discourse-cdn.com/v4/letter/r/a587f6/32.png) [@Revit\_Noob](https://forum.dynamobim.com/u/Revit_Noob)\
**Post date:** [June 12, 2019, 7:21am UTC](https://forum.dynamobim.com/t/reload-upgraded-revit-links/36981/13 "2019-06-12T07:21:50Z")

</div>

![RELOAD_UPGRADED%20LINKS](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/0/006beb063de77ceaf989dfd2bded8574017d579d.jpeg)

and here’s the result :

 ![RELOAD_UPGRADED%20LINKS-2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/e/6ee35bc75ab0fb9a4321872595c50144828f6c7d.jpeg)

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [June 12, 2019, 8:12am UTC](https://forum.dynamobim.com/t/reload-upgraded-revit-links/36981/14 "2019-06-12T08:12:09Z")

</div>

You have a unnecessary longest lacing on GetItemAtIndex node. Use Shortest lacing instead.  
Note that in your test file the AllIndicesOf and GetItemAtIndex nodes are useless because the filepaths are already in the right order.

---

<div class="post-metadata">

**Author:** ![Revit\_Noob](https://avatars.discourse-cdn.com/v4/letter/r/a587f6/32.png) [@Revit\_Noob](https://forum.dynamobim.com/u/Revit_Noob)\
**Post date:** [June 13, 2019, 7:56am UTC](https://forum.dynamobim.com/t/reload-upgraded-revit-links/36981/15 "2019-06-13T07:56:10Z")

</div>

if i remove the List.AllIndicesOf node since the list is already in the right order, how will i connect to the Repath node?

---

<div class="post-metadata">

**Author:** ![stillgotme](https://avatars.discourse-cdn.com/v4/letter/s/e480ec/32.png) [@stillgotme](https://forum.dynamobim.com/u/stillgotme)\
**Post date:** [June 13, 2019, 8:08am UTC](https://forum.dynamobim.com/t/reload-upgraded-revit-links/36981/16 "2019-06-13T08:08:00Z")

</div>

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/2/a2967b530003c04f0f366f8397154d3bac2c4fbe.jpeg)  
blue is delete, red is connect

---

<div class="post-metadata">

**Author:** ![stillgotme](https://avatars.discourse-cdn.com/v4/letter/s/e480ec/32.png) [@stillgotme](https://forum.dynamobim.com/u/stillgotme)\
**Post date:** [June 13, 2019, 8:08am UTC](https://forum.dynamobim.com/t/reload-upgraded-revit-links/36981/17 "2019-06-13T08:08:57Z")

</div>

but still, i would always have some sort of sorting mechanism before using any repathing of link files 🙂

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [June 13, 2019, 8:11am UTC](https://forum.dynamobim.com/t/reload-upgraded-revit-links/36981/18 "2019-06-13T08:11:24Z")

</div>

It will probably not work in a real project with a lot of links but it will do the job for your test file.  
As @stillgotme wrote and as I did in the second post, it’s really better to sort the lists of filepaths in the same order.

 ![links%20repath](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/3/8305b9da7eeba57d5b162c8ee9dfb2509a9b3ac2.jpeg)

---

<div class="post-metadata">

**Author:** ![Revit\_Noob](https://avatars.discourse-cdn.com/v4/letter/r/a587f6/32.png) [@Revit\_Noob](https://forum.dynamobim.com/u/Revit_Noob)\
**Post date:** [June 13, 2019, 8:15am UTC](https://forum.dynamobim.com/t/reload-upgraded-revit-links/36981/19 "2019-06-13T08:15:28Z")

</div>

Okay…i will try to detach multiple central files and save it to R19 so i can test the code on the actual project.

Thanks! will feedback later.
