Hi Brian, I sent you a new file.
General I didn’t used Vray for this project. Only basic Rhino materials, since I want to use Enscape only. I set the IOR since I hoped it can be used for a plastic look.
I’m looking for a way to use a material name like “White Wall” at several different block parts (not instances of the same block) and finally I want to see one “White wall” at the assembly file, so that I can change the “white wall” color of all blocks.
(VfR2 was working so and I try to get the workflow for Rhino materials and Enscape. If a linked block was loaded than VfR ask me “do you want to keep the scene material, update it by the block material or you like a renamed copy”. Keeping the assembly scene material was good for 99,9% of the use. Maybe an option at the Block editor could help - “merge materials with same name to one material and keep scene material”.)
I tested the issue of the duplicated materials with the new example file. I changed the color at the linked block and updated the block. For updating I used the attached script. After a few color adjustments->saves->updates I got duplicated material names again.
’Script written by Pascal
’Script version Wednesday, March 14, 2012
Dim aObj: aObj = Rhino.GetObjects(“Select blocks to update.”, 4096, True)
If Not isArray(aObj) Then Exit Sub
Dim sBlock, aUpdate(), n
n = 0
For Each sBlock In aObj
ReDim Preserve aUpdate(n)
aUpdate(n) = Rhino.BlockInstanceName(sBlock)
n = n + 1
Dim aFinal: aFinal = Rhino.CullDuplicateStrings(aUpdate)
str = “”
For Each sBlock In aFinal
X = Rhino.BlockInstanceName(sBlock)
str = str & " _Update " & chr(34) & sBlock & chr(34)
str = “_-BlockManager” & str & " _Enter _Enter"
Rhino.Command str, False