@ Harrie:
Can you explain in more detail what you are trying to do:
Are you trying to do this?:
1. Create a layer filter programmatically.
2. Read the layer filter programmatically.
3. Use the layer filter as a selection criterion for the layers.
4. Do something with a list of layers (as strings, enames or objects).
If so, why not skip step 1 and step 2?
And what do you want to use the list of layers for? Let's say you have a 'Frozen' layer filter. What would you want to do with the layers that pass that filter?
Note:
There are two systems of storing layer filters. In the code samples linked to in this post the 'old' (< AC2005) "ACAD_LAYERFILTERS" system is used. The 'new' sytem uses a different dictionary: "ACLYDICTIONARY" and a different format for the filters. This means that code for reading and erasing layer filters would have to cope with both systems. The previously linked to 'erase' code does not work for the new system.
In BricsCAD (I don't use AutoCAD) editing a single 'old' style layer filter means that all filters are automatically translated to the 'new' system.