0 Members and 1 Guest are viewing this topic.
Krushert,Me again. From the coding examples, I'm able to create "~M*".But not the second line "*|*". Do you know how?
(defun c:EagerToLearnCAD ( / xdict dict xrecname ) (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 "EagerToLearnCAD")) (strcat "Layer filter named <" xrecname "> already exists." ) (if (dictadd dict xrecname (entmakex (append '( (0 . "xrecord") (100 . "AcDbXrecord") (280 . 1) ) (list (cons 1 xrecname)) '( (1 . "~M*,*|*") (1 . "*") (1 . "*") (70 . 0) (1 . "*") (1 . "*") (-3 ( "ACAD" (1000 . "( NAME== \"~M*\" or NAME== \"*|*\" )") ) ) ) ) ) ) (strcat "Created layer filter named <" xrecname ">." ) "Doh! Something horrible happened: Call mommy." ) ) ) (princ) )
Thanks guys!MP,One last. Do you know how to check/select the "Invert Filter" checkbox with lisp? I wouldlike to be able to toggle it (check/unchecked) in my small program.
(ssget '((-4 . "<not")(8 . "*|*")(-4 . "not>"))))