Create layer properties filter

Create layer properties filter

Sandervp
Advocate Advocate
5,865 Views
25 Replies
Message 1 of 26

Create layer properties filter

Sandervp
Advocate
Advocate

Hello everybody,

 

I have a lisp which creates several layer group filters. But I want to add some property filters also.

 

My lisp file is containting rules like this: (Command "-layer" "filter" "n" "g" "*example*" "" "*exampl*" "example" "")

I want to add (Command "-layer" "filter" "n" "p".......... but how further?

 

I want to have property filters for "off", "on", "frozen" and "thawed"

 

Could somebody help me?

 

Thanks

Sander

Accepted solutions (1)
5,866 Views
25 Replies
Replies (25)
Message 2 of 26

ВeekeeCZ
Consultant
Consultant

... All 

 

OFF=="False"

 

FROZEN=="False"

 

or both

OFF=="False" AND FROZEN=="False"

0 Likes
Message 3 of 26

Sandervp
Advocate
Advocate

Hello BeekeeCZ

 

thanks for your reply but I do not understand it really..

 

After I create the property filter for all the layers which are off, I see all the layers also the which are on or frozen.

 

What am I doing wrong? 

0 Likes
Message 4 of 26

ВeekeeCZ
Consultant
Consultant

Maybe my command line list clear this out.

 

Spoiler
Current layer:  "0"
Enter an option [?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/TRansparency/MATerial/Plot/PStyle/Freeze/Thaw/LOck/Unlock/stAte/Description/rEconcile]: filter

Enter a layer filter option [New/Set/Rename/Edit/Delete/eXit]: new

Select layer filter type [Group/Property]: p

Enter parent layer filter <All>: all

Enter parent layer filter <All>: All

Enter property filter definition: OFF=="False"

Enter name for layer filter: LayON

Current layer filter: "LayON"

Enter a layer filter option [New/Set/Rename/Edit/Delete/eXit]: n

Select layer filter type [Group/Property]: p

Enter parent layer filter <All>: a

Enter parent layer filter <All>: a

Enter parent layer filter <All>: All

Enter property filter definition: FROZEN=="True"

Enter name for layer filter: LayFRZ

Current layer filter: "LayFRZ"

Enter a layer filter option [New/Set/Rename/Edit/Delete/eXit]: x
Enter an option [?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/TRansparency/MATerial/Plot/PStyle/Freeze/Thaw/LOck/Unlock/stAte/Description/rEconcile]:

Command:

Btw You can see that there are multiple "Enter parent layer filter <All>: all" lines. I had to set "All" three times until it was accepted (acad 2016). Test this behaviour! This may be a problem for your lisp. Perhaps use just "" for enter intead of "a" or "all".

0 Likes
Message 5 of 26

Sandervp
Advocate
Advocate

Thank you BeekeeCZ,

 

If I do this like you, om the command line, it works. But if I put this: 


(Command "-layer" "filter" "n" "p" "" "frozen=="true"" "" "frozen" "")

 into a lisp it doesn't work..

 

If I look in the text window I see this:

Command: -layer
Current layer: "0"
Enter an option [?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/TRansparency/MATerial/Plot/Freeze/Thaw/LOck/Unlock/stAte/Description/rEconcile]: filter
Current layer filter: "example"
Select layer filter type [Group/Property]: p
Enter parent layer filter <All>:
Enter property filter definition: frozen==
Command:

It doesn't take frozen=="true".

 

greetings

0 Likes
Message 6 of 26

ВeekeeCZ
Consultant
Consultant
Accepted solution

Quotes are the problem. You need to use the backslash character \ with quote marks.  ... See the other special characters...... HERE

 

(Command "-layer" "filter" "n" "p" "" "frozen==\"true\"" "" "frozen" "")

 

Message 7 of 26

Sandervp
Advocate
Advocate

Thanks!!

 

I'd made the filter "ON". 

(Command "-layer" "filter" "n" "p" "" "off==\"false\"" "" "on" "")

But I'm seeing the frozen layers also.

 

In your reply you wrote: 

or both

OFF=="False" AND FROZEN=="False"

 

 

How do I put this into the command string?

 

 

Is it also possible to group all the filters (Like in windows explorer) by using a command string in my lisp? You have got one map with all the group filters and one map with all the property filters?

 

 

0 Likes
Message 8 of 26

ВeekeeCZ
Consultant
Consultant

@Sandervp wrote:

 

....

OFF=="False" AND FROZEN=="False"

 

How do I put this into the command string?

 

...

 

Same pattern as before... all inner quotes with the backslash.

 

"OFF==\"False\" AND FROZEN==\"False\""

 

 

 


@Sandervp wrote:

... 

Is it also possible to group all the filters (Like in windows explorer) by using a command string in my lisp? You have got one map with all the group filters and one map with all the property filters?

 

 


How about try it? 🙂

If you want to create sub-filter, use some filter you aready have for "patern layer filter" instead of "All".

I think you can combine filters by same rules as you can in dialog box.

 

Spoiler
Command: -LAYER

Current layer:  "0"
Enter an option [?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/TRansparency/MATerial/Plot/PStyle/Freeze/Thaw/LOck/Unlock/stAte/Description/rEconcile]: filter

Enter a layer filter option [New/Set/Rename/Edit/Delete/eXit]: ne

Select layer filter type [Group/Property]: p

Enter parent layer filter <All>:

Enter property filter definition: OFF=="False"

Enter name for layer filter: OFF

Current layer filter: "OFF"

Enter a layer filter option [New/Set/Rename/Edit/Delete/eXit]: N

Select layer filter type [Group/Property]: P

Enter parent layer filter <All>: OFF

Enter property filter definition: FROZEN=="False"

Enter name for layer filter: FROZEN

Current layer filter: "FROZEN"

Enter a layer filter option [New/Set/Rename/Edit/Delete/eXit]: n

Select layer filter type [Group/Property]: g

Enter parent layer filter <All>: OFF

Enter name list of layer(s) to include: 0

Enter name for layer filter: zero

Current layer filter: "zero"

Enter a layer filter option [New/Set/Rename/Edit/Delete/eXit]: x
Enter an option [?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/TRansparency/MATerial/Plot/PStyle/Freeze/Thaw/LOck/Unlock/stAte/Description/rEconcile]:

 

Message 9 of 26

Sandervp
Advocate
Advocate

Thanks again BeekeeCZ!!

 

All the layer filters are correct and ordered in 2 group filters/ maps!

 

 

0 Likes
Message 10 of 26

Sandervp
Advocate
Advocate

Sorry to interrupt you again BeekeeCZ....

 

I've changed my lisp file. The lisp file must create a parent filter first (called "No_Xref_Layers") and after this filter is created, it has to create more filters.

 

If I use the command "Xrefnot" or "createfilters" one by one, it's no problem.

But if I combine these commands in the lisp file, by creating another command, it doesn't work. They are "unknown commands" after using the lisp.

 

Something is wrong, but I can't figure it out..

 

This is the combined lisp file:

(defun c:XREFNOT ( / xdict dict xrecname )
 (vl-load-com)
    (setq xdict
        (vlax-vla-object->ename
            (vla-getextensiondictionary 
                (vla-get-layers 
                    (vla-get-activedocument (vlax-get-acad-object))
                )
            )
        )    
    )
    
    (setq dict
        (if (setq dict (dictsearch xdict "ACAD_LAYERFILTERS"))
            (cdr (assoc -1 dict))
            (dictadd xdict "ACAD_LAYERFILTERS"
                (entmakex
                   '(
                        (0 . "dictionary")
                        (100 . "AcDbDictionary")
                        (280 . 0)
                        (281 . 1)
                    )
                )
            )
        )
    )
    
    (princ
        (if (dictsearch dict (setq xrecname "No_Xref_Layers"))
            (strcat
                "Layer filter named <"
                xrecname
                "> already exists."
            )
            (if
                (dictadd dict xrecname
                    (entmakex
                        (append
                           '(
                                (0 . "xrecord")
                                (100 . "AcDbXrecord")
                                (280 . 1)
                            )    
                            (list (cons 1 xrecname))
                           '(
                                (1 . "~*|*")
                                (1 . "*")
                                (1 . "*")
                                (70 . 0)
                                (1 . "*")
                                (1 . "*")
                                (-3          
                                    (   "ACAD"
                                        (1000 . "( NAME== \"~*|*\" )")
                                    )         
                                )
                            )    
                        )
                    )
                )
                (strcat
                    "Created layer filter named <"
                    xrecname
                    ">."
                )
                
            )    
        )    
    )    
(command ".-layer" "filter" "set" "No_Xref_Layers" "")    

    (princ)    
);_End of defun 
 
 
(Defun C:createfilters () 
     
     (Command "-layer" "filter" "n" "g" "No_Xref_Layers" "**" "Lagen" "")

     (Command "-layer" "filter" "n" "g" "Lagen" "*57*" "" "57 - LUCHT" "")
     (Command "-layer" "filter" "n" "g" "Lagen" "*56*" "" "56 - CV" "")
     (Command "-layer" "filter" "n" "g" "Lagen" "*55*" "" "55 - GKW" "")
     (Command "-layer" "filter" "n" "g" "Lagen" "*54*" "" "54 - GASSEN" "")
     (Command "-layer" "filter" "n" "g" "Lagen" "*53*" "" "53 - WATER" "")
     (Command "-layer" "filter" "n" "g" "Lagen" "*52*" "" "52 - RIOOL" "")
     (Command "-layer" "filter" "n" "g" "Lagen" "*5*" "" "5 - W-INSTALLATIE" "")
     (Command "-layer" "filter" "n" "g" "Lagen" "*WM*" "" "5X - MAATVOERING" "")

     (Command "-layer" "filter" "n" "p" "No_Xref_Layers" "Eigenschappen" "Eigenschappen" "")

     (Command "-layer" "filter" "n" "p" "Eigenschappen" "frozen==\"true\"" "" "frozen" "")
     (Command "-layer" "filter" "n" "p" "Eigenschappen" "off==\"true\"" "" "off" "")
     (Command "-layer" "filter" "n" "p" "Eigenschappen" "off==\"false\" and frozen==\"false\"" "" "on" "")
     (Command "-layer" "filter" "n" "p" "Eigenschappen" "frozen==\"false\"" "" "thawed" "")
     (Command "-layer" "filter" "n" "p" "Eigenschappen" "locked==\"true\"" "" "locked" "")
     (Command "-layer" "filter" "n" "p" "Eigenschappen" "locked==\"false\"" "" "unlocked" "")
     (Command "-layer" "filter" "n" "p" "Eigenschappen" "plottable==\"false\"" "" "no plot" "")

(princ)
);_End of defun

(Defun C:ftr ()
     (Command "qsave")
     (Command "xrefnot")
     (Command "createfilters")

(princ "\n...All layer filters have been created.")
(princ)
)
Message 11 of 26

ВeekeeCZ
Consultant
Consultant

@Sandervp wrote:

Sorry to interrupt you again BeekeeCZ....

 

I've changed my lisp file. The lisp file must create a parent filter first (called "No_Xref_Layers") and after this filter is created, it has to create more filters.

 

If I use the command "Xrefnot" or "createfilters" one by one, it's no problem.

But if I combine these commands in the lisp file, by creating another command, it doesn't work. They are "unknown commands" after using the lisp.

 

Something is wrong, but I can't figure it out..

 

 


 

You cannot call your functions with (command). You need to use their names - including "c:" if there is one.

 

(Defun C:ftr ()
     (Command "qsave")
     (c:xrefnot)
     (c:createfilters)

(princ "\n...All layer filters have been created.")
(princ)
)
Message 12 of 26

Sandervp
Advocate
Advocate

Thanks again BeekeeCZ!!

 

It's working perfect! It makes it a lot easier for me because the many layers in our drawings!

0 Likes
Message 13 of 26

SKUIBREAKER2
Contributor
Contributor

THIS IS SPECTACULAR!!     Thank you this is so very helpful!

 

(defun c:XREFNOT ( / xdict dict xrecname )
 (vl-load-com)
    (setq xdict
        (vlax-vla-object->ename
            (vla-getextensiondictionary 
                (vla-get-layers 
                    (vla-get-activedocument (vlax-get-acad-object))
                )
            )
        )    
    )
    
    (setq dict
        (if (setq dict (dictsearch xdict "ACAD_LAYERFILTERS"))
            (cdr (assoc -1 dict))
            (dictadd xdict "ACAD_LAYERFILTERS"
                (entmakex
                   '(
                        (0 . "dictionary")
                        (100 . "AcDbDictionary")
                        (280 . 0)
                        (281 . 1)
                    )
                )
            )
        )
    )
    
    (princ
        (if (dictsearch dict (setq xrecname "No_Xref_Layers"))
            (strcat
                "Layer filter named <"
                xrecname
                "> already exists."
            )
            (if
                (dictadd dict xrecname
                    (entmakex
                        (append
                           '(
                                (0 . "xrecord")
                                (100 . "AcDbXrecord")
                                (280 . 1)
                            )    
                            (list (cons 1 xrecname))
                           '(
                                (1 . "~*|*")
                                (1 . "*")
                                (1 . "*")
                                (70 . 0)
                                (1 . "*")
                                (1 . "*")
                                (-3          
                                    (   "ACAD"
                                        (1000 . "( NAME== \"~*|*\" )")
                                    )         
                                )
                            )    
                        )
                    )
                )
                (strcat
                    "Created layer filter named <"
                    xrecname
                    ">."
                )
                
            )    
        )    
    )    
(command ".-layer" "filter" "set" "No_Xref_Layers" "")    

    (princ)    
);_End of defun 
 
 
(Defun C:createfilters () 
     
     (Command "-layer" "filter" "n" "g" "No_Xref_Layers" "**" "GROUPS" "")

     (Command "-layer" "filter" "n" "g" "GROUPS" "A-*" "" "A-ARCH" "")
     (Command "-layer" "filter" "n" "g" "GROUPS" "P-*" "" "P-PLUMBING" "")
     (Command "-layer" "filter" "n" "g" "GROUPS" "S-*" "" "S-STRUCT" "")
     (Command "-layer" "filter" "n" "g" "GROUPS" "M-*" "" "M-HVAC" "")
     (Command "-layer" "filter" "n" "g" "GROUPS" "E-*" "" "E-ELECTRICAL" "")
     (Command "-layer" "filter" "n" "g" "GROUPS" "*GRID*" "" "GRID" "")
     (Command "-layer" "filter" "n" "g" "GROUPS" "*COLS*" "" "COLS" "")
     (Command "-layer" "filter" "n" "g" "GROUPS" "*DOOR*" "" "DOORS" "")
	(Command "-layer" "filter" "n" "g" "GROUPS" "*GLAZ*" "" "WINDOWS" "")
	(Command "-layer" "filter" "n" "g" "GROUPS" "*HRAL*" "" "RAILING" "")
	(Command "-layer" "filter" "n" "g" "GROUPS" "*PAT*" "" "PATTERNS" "")
	(Command "-layer" "filter" "n" "g" "GROUPS" "*FURN*" "" "FURNITURE" "")
	(Command "-layer" "filter" "n" "g" "GROUPS" "*PAT*" "" "PATTERNS" "")
	(Command "-layer" "filter" "n" "g" "GROUPS" "*A-ANNO*" "" "ANNOTATIONS" "")
	(Command "-layer" "filter" "n" "g" "GROUPS" "*DIM*" "" "DIMENSIONS" "")

     (Command "-layer" "filter" "n" "p" "No_Xref_Layers" "PROP" "PROP" "")
     (Command "-layer" "filter" "n" "p" "PROP" "frozen==\"true\"" "" "frozen" "")
     (Command "-layer" "filter" "n" "p" "PROP" "off==\"true\"" "" "off" "")
     (Command "-layer" "filter" "n" "p" "PROP" "off==\"false\" and frozen==\"false\"" "" "on" "")
     (Command "-layer" "filter" "n" "p" "PROP" "frozen==\"false\"" "" "thawed" "")
     (Command "-layer" "filter" "n" "p" "PROP" "locked==\"true\"" "" "locked" "")
     (Command "-layer" "filter" "n" "p" "PROP" "locked==\"false\"" "" "unlocked" "")
     (Command "-layer" "filter" "n" "p" "PROP" "plottable==\"false\"" "" "no plot" "")

(princ)
);_End of defun

(Defun C:ftr ()
     (Command "qsave")
     (c:xrefnot)
     (c:createfilters)

(princ "\n...All layer filters have been created.")
(princ)
)

 

 

0 Likes
Message 14 of 26

SKUIBREAKER2
Contributor
Contributor

i JUST TACKED THIS ONTO TOO

 

 

(Command "-layer" "filter" "n" "p" "PROP" "NAME==\"A-*\"" "A-ARCHITECTURAL" "")
(Command "-layer" "filter" "n" "P" "PROP" "NAME==\"P-*\"" "P-PLUMBING" "")
(Command "-layer" "filter" "n" "P" "PROP" "NAME==\"S-*\"" "S-STRUCTURAL" "")
(Command "-layer" "filter" "n" "P" "PROP" "NAME==\"M-*\"" "M-HVAC" "")
(Command "-layer" "filter" "n" "P" "PROP" "NAME==\"E-*\"" "E-ELECTRICAL" "")
(Command "-layer" "filter" "n" "P" "PROP" "NAME==\"*GRID*\"" "GRIDS" "")
(Command "-layer" "filter" "n" "P" "PROP" "NAME==\"*COLS*\"" "COLUMNS" "")
(Command "-layer" "filter" "n" "P" "PROP" "NAME==\"*DOOR*\"" "DOORS" "")
(Command "-layer" "filter" "n" "P" "PROP" "NAME==\"*GLAZ*\"" "WINDOWS" "")
(Command "-layer" "filter" "n" "P" "PROP" "NAME==\"*HRAL*\"" "RAILING" "")
(Command "-layer" "filter" "n" "P" "PROP" "NAME==\"*PAT*\"" "PATTERNS" "")
(Command "-layer" "filter" "n" "P" "PROP" "NAME==\"*FURN*\"" "FURNITURE" "")
(Command "-layer" "filter" "n" "P" "PROP" "NAME==\"*PAT*\"" "PATTERNS" "")
(Command "-layer" "filter" "n" "P" "PROP" "NAME==\"*A-ANNO*\"" "ANNOTATIONS" "")
(Command "-layer" "filter" "n" "P" "PROP" "NAME==\"*DIM*\"" "DIMENSIONS" "")

 Obviously, I had to change the Group name so they didn't match the new Property names

 

0 Likes
Message 15 of 26

SKUIBREAKER2
Contributor
Contributor

STEP 2:    IS TO MODIFY the LISP TO AUTOMATICALLY CHANGE ALL OF the layers in each group or property filter into a specific color.

This will allow super fast changing of Arch & Structural files into backgrounds that print faded or transparent.

0 Likes
Message 16 of 26

Sandervp
Advocate
Advocate

Hello @ВeekeeCZ,

 

I've added some extra filters to my lisp. These filters appear between the other layer filters but they doesn't contain any layer which meet the requirements. 

 

If I look at the main filter ("No_Xref_Layers"), the layers are visible. But if I look at the new (sub) filters, no layer appears. The new filters doesn't contain any layer at all..

 

What's wrong with my lisp?

I've copied "(Command "-layer" "filter" "n" "p" "Lagen" "name==\"*57*\"" "57 - LUCHT" "")" twice and I've changed this into  "(Command "-layer" "filter" "n" "p" "Lagen" "name==\"*WT*\"" "5X - TEKST" "")" and "(Command "-layer" "filter" "n" "p" "Lagen" "name==\"*$1*\"" "OVERIGE" "")".

 

Could you help me?

 

I've attached the new lisp to this reply.

 

Greets Sander

 

 

0 Likes
Message 17 of 26

ВeekeeCZ
Consultant
Consultant

Hi. Man, I tend to answer NO DWG, NO HELP. Actually I would not answer at all for that reason. Fortunately for you I've remembered that you've posted dwg before so I've made the effort and found it in the another thread.

 

Your code worked/s for me in C3D 2016 despite the fact, that the layer filter properties dialog does not understand filter definitions written low case and also you have too many "" in all property filters (frozen, locked, etc...). 

 

(defun c:FTR nil
  
  (command  "_.QSAVE")
  
  (command "_.-LAYER" "_Filter" "_N" "_P" "All" 		"NAME== \"~*|*\"" 				"No_Xref_Layers" ) 		(if (> (getvar 'CMDACTIVE) 0) (command ""))
  (command "_.-LAYER" "_Filter" "_N" "_P" "No_Xref_Layers" "NAME==\"*\"" 					"Lagen" ) 			(if (> (getvar 'CMDACTIVE) 0) (command ""))
  
  (command "_.-LAYER" "_Filter" "_N" "_P" "Lagen" 		"NAME==\"*57*\"" 				"57 - LUCHT" ) 			(if (> (getvar 'CMDACTIVE) 0) (command ""))
  (command "_.-LAYER" "_Filter" "_N" "_P" "Lagen" 		"NAME==\"*56*\"" 				"56 - CV" ) 			(if (> (getvar 'CMDACTIVE) 0) (command ""))
  (command "_.-LAYER" "_Filter" "_N" "_P" "Lagen" 		"NAME==\"*55*\"" 				"55 - GKW" ) 			(if (> (getvar 'CMDACTIVE) 0) (command ""))
  (command "_.-LAYER" "_Filter" "_N" "_P" "Lagen" 		"NAME==\"*54*\"" 				"54 - GASSEN" ) 		(if (> (getvar 'CMDACTIVE) 0) (command ""))
  (command "_.-LAYER" "_Filter" "_N" "_P" "Lagen" 		"NAME==\"*53*\"" 				"53 - WATER" ) 			(if (> (getvar 'CMDACTIVE) 0) (command ""))
  (command "_.-LAYER" "_Filter" "_N" "_P" "Lagen" 		"NAME==\"*52*\"" 				"52 - RIOOL" ) 			(if (> (getvar 'CMDACTIVE) 0) (command ""))
  (command "_.-LAYER" "_Filter" "_N" "_P" "Lagen" 		"NAME==\"*5*\"" 				"5 - W-INSTALLATIE" ) 		(if (> (getvar 'CMDACTIVE) 0) (command ""))
  (command "_.-LAYER" "_Filter" "_N" "_P" "Lagen" 		"NAME==\"*WM*\"" 				"5X - MAATVOERING" ) 		(if (> (getvar 'CMDACTIVE) 0) (command ""))
  (command "_.-LAYER" "_Filter" "_N" "_P" "Lagen" 		"NAME==\"*WT*\"" 				"5X - TEKST" ) 			(if (> (getvar 'CMDACTIVE) 0) (command ""))
  (command "_.-LAYER" "_Filter" "_N" "_P" "Lagen" 		"NAME==\"*$1*\"" 				"OVERIGE" ) 			(if (> (getvar 'CMDACTIVE) 0) (command ""))
  
  (command "_.-LAYER" "_Filter" "_N" "_P" "No_Xref_Layers" 	"Eigenschappen" 				"Eigenschappen" ) 		(if (> (getvar 'CMDACTIVE) 0) (command ""))
  
  (command "_.-LAYER" "_Filter" "_N" "_P" "Eigenschappen" 	"FROZEN==\"TRUE\"" 				"_Frozen" ) 			(if (> (getvar 'CMDACTIVE) 0) (command ""))
  (command "_.-LAYER" "_Filter" "_N" "_P" "Eigenschappen" 	"OFF==\"TRUE\""					"off" ) 			(if (> (getvar 'CMDACTIVE) 0) (command ""))
  (command "_.-LAYER" "_Filter" "_N" "_P" "Eigenschappen" 	"OFF==\"FALSE\" AND FROZEN==\"FALSE\""		"on" ) 				(if (> (getvar 'CMDACTIVE) 0) (command ""))
  (command "_.-LAYER" "_Filter" "_N" "_P" "Eigenschappen" 	"FROZEN==\"FALSE\"" 				"thawed" ) 			(if (> (getvar 'CMDACTIVE) 0) (command ""))
  (command "_.-LAYER" "_Filter" "_N" "_P" "Eigenschappen" 	"LOCKED==\"TRUE\"" 				"locked" ) 			(if (> (getvar 'CMDACTIVE) 0) (command ""))
  (command "_.-LAYER" "_Filter" "_N" "_P" "Eigenschappen" 	"LOCKED==\"FALSE\"" 				"unlocked" ) 			(if (> (getvar 'CMDACTIVE) 0) (command ""))
  (command "_.-LAYER" "_Filter" "_N" "_P" "Eigenschappen" 	"PLOTTABLE==\"FALSE\"" 				"no plot" ) 			(if (> (getvar 'CMDACTIVE) 0) (command ""))
  
  (command "_.-LAYER" "_Filter" "_N" "_P" "All" 		"Eigenschap" 					"Eigenschap" ) 			(if (> (getvar 'CMDACTIVE) 0) (command ""))
  
  (command "_.-LAYER" "_Filter" "_N" "_P" "Eigenschap" 		"FROZEN==\"TRUE\"" 				"_Frozen_" ) 			(if (> (getvar 'CMDACTIVE) 0) (command ""))
  (command "_.-LAYER" "_Filter" "_N" "_P" "Eigenschap" 		"OFF==\"TRUE\"" 				"off_" ) 			(if (> (getvar 'CMDACTIVE) 0) (command ""))
  (command "_.-LAYER" "_Filter" "_N" "_P" "Eigenschap" 		"OFF==\"_FALSE\" AND FROZEN==\"FALSE\"" 	"on_" ) 			(if (> (getvar 'CMDACTIVE) 0) (command ""))
  (command "_.-LAYER" "_Filter" "_N" "_P" "Eigenschap" 		"FROZEN==\"FALSE\"" 				"thawed_" ) 			(if (> (getvar 'CMDACTIVE) 0) (command ""))
  (command "_.-LAYER" "_Filter" "_N" "_P" "Eigenschap" 		"LOCKED==\"TRUE\"" 				"locked_" ) 			(if (> (getvar 'CMDACTIVE) 0) (command ""))
  (command "_.-LAYER" "_Filter" "_N" "_P" "Eigenschap" 		"LOCKED==\"FALSE\"" 				"unlocked_" ) 			(if (> (getvar 'CMDACTIVE) 0) (command ""))
  (command "_.-LAYER" "_Filter" "_N" "_P" "Eigenschap" 		"PLOTTABLE==\"FALSE\"" 				"no plot_" ) 			(if (> (getvar 'CMDACTIVE) 0) (command ""))
  
  (command "_.-LAYER" "_Filter" "s" 	"No_Xref_Layers") 											(if (> (getvar 'CMDACTIVE) 0) (command ""))

  (princ "\n...All layer filters have been created.")
  (princ)
)

Good luck.

0 Likes
Message 18 of 26

SKUIBREAKER2
Contributor
Contributor
I will try to look at it when I get time.
0 Likes
Message 19 of 26

SKUIBREAKER2
Contributor
Contributor

Oh crap,,, nevermind ,,, sorry just realized that message wasn't directed towards me.  Wish I could edit my dang post.

0 Likes
Message 20 of 26

cwtwong
Enthusiast
Enthusiast

hi, how to change the layer color after the filter by script?

Thanks.

0 Likes