Export Layer names to ASCII list

Hi,
I’m looking for a way to export the layer names as a list in an ASCII file (text file or csv), e.g. as “layernames.txt”. How can I do this?

What have you tried so far?

Thank you Ivelin. So far I have selected all objects and done an export as csv. In the “CSV Export Options” I unchecked everything except “Layer name”. The csv has then a numbering, commata (,) and quotes ("), which I need to delete manually. Sometimes there are duplicates of the layer names, which I need to check, find out and delete. Not very efficient. What do you suggest?

So you haven’t tried any scripting?
This is what I meant.

Yes, .csv export from Rhino is intended primarily for exporting points. You can try the following script…

ExportLayerNamesTXT.py (369 Bytes)

1 Like

Thank you! Works fine.

Hello I am not able to load the script in Rhino 7. It asks for a different format (*.rvb). Would you know how to use this script which seems to be very usefu?

Hi Ramiro -

That means that you’ve used the LoadScript command.
For Python scripts, you need to use the RunPythonScript command.
-wim

1 Like

Very good, worked without a hitch in Rhino 8.