# Sorting Material List to Fix Missing Textures

**URL:** <https://forum.dynamobim.com/t/sorting-material-list-to-fix-missing-textures/69514>\
**Category:** Revit\
**Tags:** revit, dynamo, list-filter, orchid\
**Created:** [October 21, 2021, 4:02am UTC](https://forum.dynamobim.com/t/sorting-material-list-to-fix-missing-textures/69514 "2021-10-21T04:02:03Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![sparkyduke](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@sparkyduke](https://forum.dynamobim.com/u/sparkyduke)\
**Post date:** [October 21, 2021, 4:02am UTC](https://forum.dynamobim.com/t/sorting-material-list-to-fix-missing-textures/69514/1 "2021-10-21T04:02:03Z")

</div>

Hi all,

Looking to fix textures out IT team modified our server and all our Material Textures paths have changed.

I have had a tone of luck with the orchid package. But only able to remap one file path at a time.  
I am pretty new with dynamo, and I am struggling with organising the list generated. If someone could help organise my list so that all texture paths get modified and loaded into the material replace node.

See attached and

[Re-Index Texture Path.dyn](https://forum.dynamobim.com/uploads/short-url/7uUGgTD1FEzUQuYorBrUvD9Q8hb.dyn) (21.9 KB)

 ![Re-Index Texture Path_2021-10-21_01-57-49](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/f/3f1ee534b1eb531159c32c7b7f8d1ab1701bbe32.png)

---

<div class="post-metadata">

**Author:** ![honeyjain619](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/honeyjain619/32/121215_2.png) [@honeyjain619](https://forum.dynamobim.com/u/honeyjain619)\
**Post date:** [October 21, 2021, 4:54am UTC](https://forum.dynamobim.com/t/sorting-material-list-to-fix-missing-textures/69514/2 "2021-10-21T04:54:03Z")

</div>

Hello @sparkyduke  
Can you tried with this method.  
I did few changes in your script.

[Re-Index Texture Path\_2.dyn](https://forum.dynamobim.com/uploads/short-url/bCQknMPQq57BvXSVxUjzytsvzNq.dyn) (57.3 KB)

---

<div class="post-metadata">

**Author:** ![sparkyduke](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@sparkyduke](https://forum.dynamobim.com/u/sparkyduke)\
**Post date:** [October 21, 2021, 5:43am UTC](https://forum.dynamobim.com/t/sorting-material-list-to-fix-missing-textures/69514/3 "2021-10-21T05:43:47Z")

</div>

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/7/77072436aae0568237c3a9007344fa96fe4df14c.png)

Hi, I seem to be missing this package. Or I am missing one definition.

---

<div class="post-metadata">

**Author:** ![honeyjain619](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/honeyjain619/32/121215_2.png) [@honeyjain619](https://forum.dynamobim.com/u/honeyjain619)\
**Post date:** [October 21, 2021, 5:48am UTC](https://forum.dynamobim.com/t/sorting-material-list-to-fix-missing-textures/69514/4 "2021-10-21T05:48:01Z")

</div>

That node is from Rhythm package

indices = [i for i, x in enumerate(IN[0]) if x == IN[1]]  
OUT = indices

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/a/aa36b4de4333fa7bf399b865876b8c5533d5d888.png)

---

<div class="post-metadata">

**Author:** ![sparkyduke](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@sparkyduke](https://forum.dynamobim.com/u/sparkyduke)\
**Post date:** [October 21, 2021, 6:05am UTC](https://forum.dynamobim.com/t/sorting-material-list-to-fix-missing-textures/69514/5 "2021-10-21T06:05:24Z")

</div>

No Luck

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/2/5283390083ae98885233401fc3b63a20b957beed.png)

Looks like in Rhythm 2021.7.3 Its no longer used.

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/6/0668f72dc36806463db233d560f9ce1304803d1f.png)

Maybe I can try Isolated Pick Model Elements

---

<div class="post-metadata">

**Author:** ![honeyjain619](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/honeyjain619/32/121215_2.png) [@honeyjain619](https://forum.dynamobim.com/u/honeyjain619)\
**Post date:** [October 21, 2021, 6:10am UTC](https://forum.dynamobim.com/t/sorting-material-list-to-fix-missing-textures/69514/7 "2021-10-21T06:10:27Z")

</div>

yaa , i am expecting this problem you might face.  
So you can copy & Paste the python code also.  
I have provided you the python code working behind that code

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/f/5f636e5e71450991f9fc48b286bcd29116eea659.png)  
replace with this node

---

<div class="post-metadata">

**Author:** ![honeyjain619](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/honeyjain619/32/121215_2.png) [@honeyjain619](https://forum.dynamobim.com/u/honeyjain619)\
**Post date:** [October 21, 2021, 6:22am UTC](https://forum.dynamobim.com/t/sorting-material-list-to-fix-missing-textures/69514/8 "2021-10-21T06:22:32Z")

</div>

[Re-Index Texture Path\_2.1.dyn](https://forum.dynamobim.com/uploads/short-url/6NDYEqufLqYhCi09eEayfeQHBwQ.dyn) (60.9 KB)

you can use this one, you wont required additional package

---

<div class="post-metadata">

**Author:** ![sparkyduke](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@sparkyduke](https://forum.dynamobim.com/u/sparkyduke)\
**Post date:** [October 28, 2021, 7:17am UTC](https://forum.dynamobim.com/t/sorting-material-list-to-fix-missing-textures/69514/9 "2021-10-28T07:17:06Z")

</div>

Hey @honeyjain619 Thank for your help.

Just to close this off I manage to get it working like this probably not as organised as your method. But what you had wasn’t filtering the two lists I needed.

But thanks again

 ![Re-Index Texture Path_2.2 Working_2021-10-28_05-19-28](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/e/eee34bca8ec8c5ebd2ed30a3688882d0fc004b03.png)

---

<div class="post-metadata">

**Author:** ![honeyjain619](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/honeyjain619/32/121215_2.png) [@honeyjain619](https://forum.dynamobim.com/u/honeyjain619)\
**Post date:** [October 28, 2021, 7:21am UTC](https://forum.dynamobim.com/t/sorting-material-list-to-fix-missing-textures/69514/10 "2021-10-28T07:21:30Z")

</div>

Hey, @sparkyduke ,

Good to know, to resolve you own problem.  
My only motivation is to help others while improve my knowledge and concepts. 🙂 😉 😉

---

<div class="post-metadata">

**Author:** ![SdinizF](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@SdinizF](https://forum.dynamobim.com/u/SdinizF)\
**Post date:** [April 11, 2024, 1:13pm UTC](https://forum.dynamobim.com/t/sorting-material-list-to-fix-missing-textures/69514/11 "2024-04-11T13:13:52Z")

</div>

Where can I find the “Material.All” node? Is it from Genius Loci package?
