Jump to content

Toggle layer


takeanosan

Recommended Posts

Posted

Another, simple one:

(defun c:tog nil
   (command "_.-layer" (if (setq tog:flg (not tog:flg)) "_off" "_on") "H-*" "")
   (princ)
)

  • Replies 22
  • Created
  • Last Reply

Top Posters In This Topic

  • takeanosan

    10

  • Tharwat

    8

  • pBe

    4

  • Lee Mac

    1

Top Posters In This Topic

Posted

Thanks Lee for your input, your script works excellently and is probably closest to what I would envision the code to be.

Tharwat, I found out that I could add multiple filters to the lisp, E.g. "H-*,h-*" hence filtering both upper and lower case.

 

The codes proved useful =p Now I don't have to mess around with layer state manager nor manually going to the layers tab and changing the visibility. I did another version where I changed the filter with a pause which enabled me to input my own filter on the go.

 

It was pleasant learning from you all, and your help is much appreciated.

Posted

Tharwat, I found out that I could add multiple filters to the lisp, E.g. "H-*,h-*" hence filtering both upper and lower case.

 

You did the correct way with that modification .

 

 

The codes proved useful =p Now I don't have to mess around with layer state manager nor manually going to the layers tab and changing the visibility. I did another version where I changed the filter with a pause which enabled me to input my own filter on the go.

 

It was pleasant learning from you all, and your help is much appreciated.

 

Good for you . :)

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...