PDA

View Full Version : 2018 Setting a filter layer current



jhein759286
2018-02-28, 01:40 PM
I would like to create a button that would set a specific layer filter current.

I already have this layer filter in my template = S-Layers

Thank You

rkmcswain
2018-02-28, 01:46 PM
If you are using AutoCAD (and not AutoCAD LT), use this in your macro:




(vl-cmdf ".layer" "" "filter" "_set" "S-Layers" "exit" "")

jhein759286
2018-02-28, 02:12 PM
I am using acad 2018

I copied & pasted your info into my macro & when I click on the button it pops up a dialog box = Object Selection Filters, all the boxes are empty & in named filters box it says current = *unnamed and when I click on that box it is empty also. So I must be doing something wrong or do not have it set up correctly?

Thanks for your help

rkmcswain
2018-02-28, 02:29 PM
Apologies, my bad. The lisp statement works at the command line, but not in a macro for some reason.

You can just use a straight menu macro to do it. I actually tested it this time :)

https://i.imgur.com/L9gTlXk.png

(Those are semicolons in between the statements in the macro, they act as an <ENTER>)

jhein759286
2018-02-28, 02:45 PM
That worked

Thank you