Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Layer filter deletion

Status
Not open for further replies.

CFREY

Civil/Environmental
May 29, 2003
9
Does any know of a way to delete massive numbers of layer filters at once (rather than deleting them individually in the layer filter box)? We frequently will modify a client's drawing to be used as a template, and some come with 300-400 filters, which decreases their usefullness.

Thanks for any tips here.
 
Replies continue below

Recommended for you

Hi,

here's a lisp:
;delete all Layer filters


(DEFUN C:DELFIL()
(progn
(vl-load-com)

(defun ax:GetAcadLayerFilterDictionary (/ dict)
(setq dict
(member (cons 3 "ACAD_LAYERFILTERS")
(entget
(vlax-vla-object->ename
(vla-GetExtensionDictionary
(vla-get-layers
(vla-get-ActiveDocument
(vlax-get-acad-object)
)
)
)
)
)
)
)
(if dict
(cdr (assoc 360 dict))
nil
)
)
(entdel (ax:GetAcadLayerFilterDictionary))
)
)

(prompt "\nZum starten 'DELFIL' eingeben -> VLisp Version")

regards Lothar

Win NT4.0(SP6),2000(SP3)
AC 2000i(SP2), ADT 3.0(SP3),
AC 2002, ADT 3.3,
AC 2004, ADT 2004
 
Thanks for the routine--it worked great. By the way, I'm interested in learning more about Visual Lisp--could you recommend any sources for learning it?

Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor