random wire tools

Hi There,

i am looking for the “random wire tools” script from David Mackenzie on scriptspot.
It seems his site is down now for about 2 weeks - does any body have this handy little script? I don’t want to step on the toes of David.
I am specifically looking at the part where you can set the object’s wire color based on the applied material.
Maybe someone has heard of another script/tool that can do something similar?

thanks!
wim

FWIW website seems to be working here

Happy to send it to you though?

if you could send it, that would be great. I have tried it here in Internet Explorer, Firefox and Chrome, and it does not want to connect
thanks!

Messaged you

thanks!! got it!

Anyone know if there’s a way to match the color of the layer to the wire color of the objects in that layer?
I use this Wire Colour Tools script, it works but it randomly picks colors for the wires in different layers. I’m wondering if there’s a way to tap the color of the layer to have the wires match what I’m getting when I import drawings from CAD?

There are two ways you can do this.
1. Set all objects to use their layer colour as their viewport display colour.

(
	for s in $ where isProperty s #wireColor do s.colorByLayer = true
)

2. Set all objects to use the object’s wirecolor as their viewport display colour and set the objects’ wirecolor to match the object’s layer colour.

(
	for s in $ where isProperty s #wireColor do
	(
		s.wirecolor = s.layer.wirecolor
		s.colorByLayer = false
	)
)

If you select all the objects you want to affect first then run the code you should see the wirecolors change.

Third way to do it: bribe the Wire Tools creator, David Mackenzie (daveandgoliath.com), to add the feature. Attached!

There’s now a ‘use layer color’ checkbox

It looks like there’s a small bug when using wires from imported CAD. Since the lines don’t have any wire color to begin with, you need to change their colors to something, before setting them to match the layer colors.