DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Removing Colors & Line Style from many layers

Started by Slind, December 11, 2013, 05:37:18 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Slind

Dealing with varied file types, we follow a protocol to insure formatting doesn't cause a stumble. 
First we open ( Q ) Options and proceed to strip out Color and Line Style from every layer. 
Although we barely use eight layers, clients can have as many as sixty layers.  Unchecking the
' Assign Color " & " Assign Line Style " for every layer is tedious at best.  Is there a better way
to clear these?

Thank you.

Slind 

" What you see in the mirror is the
  opposite of what everyone else sees.
  No wonder the confusion. " sl

prl

#1
Slind, I would use basiccad.

'Program: pbls.d3m (purge bylayer settings)

cl=sys(3)
sys(36)=1 'silent mode
count=200 'change this to the number of layers you want to cycle through

for i = 0 to count
    sys(3)=i
    GetLayerProps i
    sys(534) = 0 'bylayer line style
    sys(530) = 0 'bylayer color
    SetLayerProps i
next i

sys(3)=cl
sys(36)=0
regen
End

prl

Here's another version that also deletes the layer names for all those empty layers one gets when importing ACAD dwgs.

'Program: pbls_v2.d3m (purge bylayer settings)

cl=sys(3)
sys(36)=1 'silent mode
count=200 'change this to the number of layers you want to cycle through

for i = 0 to count
    sys(3)=i
    GetLayerProps i
    sys(534) = 0 'bylayer line style
    sys(530) = 0 'bylayer color
   
    'the below two lines delete the names of empty layers, otherwise comment them out and you get the original version above
    y = LAYER(i)
    if ODD(y)=0 then sys$(93) = ""

   
    SetLayerProps i
next i

sys(3)=cl
sys(36)=0
regen
End

Lar

With v22 and 23 open the new layer dialog, right click on any layer slot, click 'clear all layer colors', etc.

Before v22 you would have to use Prl's macros, I think.

Lar

Slind


DrollTroll

25 years with DesignCAD