×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Layer filter deletion

Layer filter deletion

Layer filter deletion

(OP)
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.

RE: Layer filter deletion

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

RE: Layer filter deletion

(OP)
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!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources