- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everybody,
A while ago, I asked something about creating a layer filter (see Layer filter). The problem was solved but I do have a problem again, it could be because I'm using this lisp for the first time at AutoCad 2017.
I have some layers which doesn't appear in a group filter.
My lisp does create several filters. Properties filters for all the layers in a drawing but also group and properties filters for all the layers which aren't part of the external references.
I do have 70 layers at my current drawing. If I look to the filter for all the layers, I see 70 layers. That's correct. Also if I look to the properties filter of the "Xref-not" filter, 65 layers are visible (the 5 missing layers are from the xref)
But if I look to the group filter at the "xref-not" filter, 49 layers appear... Not the 65 layers.
For example:
At the properties filter, the layers called WL5501--" and "WL5501--_D" are visible. But if I look to the group filter (created with "(Command "-layer" "filter" "n" "g" "Lagen" "*55*" "" "55 - GKW" "")" I only see the layer "WL5501--" and the "WL5501--_D" layer isn't visible.
Why?
Thank you for your help.
This is the lisp which I'm using:
(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" "") (Command "-layer" "filter" "n" "p" "" "Eigenschap" "Eigenschap" "") (Command "-layer" "filter" "n" "p" "Eigenschap" "frozen==\"true\"" "" "frozen_" "") (Command "-layer" "filter" "n" "p" "Eigenschap" "off==\"true\"" "" "off_" "") (Command "-layer" "filter" "n" "p" "Eigenschap" "off==\"false\" and frozen==\"false\"" "" "on_" "") (Command "-layer" "filter" "n" "p" "Eigenschap" "frozen==\"false\"" "" "thawed_" "") (Command "-layer" "filter" "n" "p" "Eigenschap" "locked==\"true\"" "" "locked_" "") (Command "-layer" "filter" "n" "p" "Eigenschap" "locked==\"false\"" "" "unlocked_" "") (Command "-layer" "filter" "n" "p" "Eigenschap" "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) )
(notice; "Lagen" and "Eigenschappen" are Dutch for "Layers" and "Properties")
Solved! Go to Solution.