TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Matt__W on January 23, 2017, 07:22:58 AM

Title: Layer Filter count
Post by: Matt__W on January 23, 2017, 07:22:58 AM
Anyone have a quick and dirty LSP to count the total number of layer filters within a drawing (2016)? I'm trouble-shooting a DWG and there must be a few HUNDRED layer filters in it and I was curious as to exactly how many.

Thanks!
Title: Re: Layer Filter count
Post by: VovKa on January 23, 2017, 07:44:07 AM
Code: [Select]
(vlax-get (vla-Item (vla-GetExtensionDictionary
      (vla-get-Layers (vla-get-ActiveDocument (vlax-get-acad-object)))
    )
    "ACAD_LAYERFILTERS"
  )
  "COUNT"
)
Title: Re: Layer Filter count
Post by: Matt__W on January 23, 2017, 08:04:49 AM
Thanks!
No wonder the drawing is so slow when copying/pasting.

Command: (vlax-get (vla-Item (vla-GetExtensionDictionary (vla-get-Layers (vla-get-ActiveDocument (vlax-get-acad-object))))"ACAD_LAYERFILTERS") "COUNT")
16087 <<<<<  :-o
Title: Re: Layer Filter count
Post by: Matt__W on January 23, 2017, 08:08:45 AM
To help put things in perspective, there are maybe, MAYBE, a dozen layers in this particular drawing.