(setq dicts (vla-GetExtensionDictionary (vla-Get-Layers (vla-Get-ActiveDocument (vlax-Get-Acad-Object) ) ) ) ) (foreach dict dicts ;;;look for the name of the dict to be either "ACAD_LAYERFILTERS" for pre-2005 or ;;;"AcLyDictionary" for 2005 )