Jump to content

layer "123" off, layer "456" on button


Chmcdan

Recommended Posts

we have a button that does our plot settings automaticly. (11x17 plots 11x17 with correct .ctb and other settings). So, I have a client that has an "add" layer that needs turned on and a "remove" layer that needs turned off when plotted. I would also like to be able to reverse that with another button that has the turn on the "remove" layer and turn off the "add" layer command. Do I make any sense at all?

Link to comment
Share on other sites

You just want to turn on certain layers and turn off others?

Just use the -layer command in your button macro, or if you prefer create a simple lisp statement [i.e.: (command "._layer" ....) ] and call this statement in your macro.

Link to comment
Share on other sites

I wrote two buttons that turn on or off a "preliminary" stamp that we put on our drawings. The button to turn off also saves and closes the drawing.

 

turns on: ^C^C_LAYER;ON;"PRELIMINARY - TITLEBLOCK TEXT";;

turns off: ^C^C_LAYER;OFF;"PRELIMINARY - TITLEBLOCK TEXT";;_QSAVE;_CLOSE

 

The quotes are necessary in my case since the layer name (the text between the quotes) includes spaces and special charecters.

 

To diddle with both layers in the same command it should be:

^C^C_LAYER;OFF;"layer2turnoff";;_LAYER;ON;"LAYERTOTURNON";;

 

If ya wanna get fancy, you could make it:

^C^C_LAYER;OFF;"layer2turnoff";;_LAYER;ON;"LAYERTOTURNON";;_PLOT;

which should kick off the plot dialog - smarter folks than me will need to get involved if you want the button to select your device and actually send it to the printer.

 

Hope this helps,

Glen

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...