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.

Trun on/off layers by macro

Started by Pearco, July 17, 2013, 03:15:34 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Pearco

I would like to turn on and turn off some layers with a macro. An example is I could have items on say layers 31,32 and 33 that I may want to turn off for printing, then turn on again with a custom tool bar. Is this possible or am I barking up a tree? I have searched the developers manual for clues and it may be I can't see the forest from the trees in front of me.

Thanks
Jim
User since ProDesign 1.5

prl

Jim,

Easy to do.  Here is a sample program to help you get started.


'Program: Loff (layers off)

for i=31 to 33
      layer(i)=0
next i

Regen

End



To turn those same layers on, change the line of code to  layer(i)=6

Pearco

Thanks prl. I had found the layer on and off ( 0/1 ) but did not think to try a for next. Like I said, can't see the forest because the trees are in the way.

Thanks again.
Jim
User since ProDesign 1.5