Delete and Create New Layers

Hello Guys,

I am a newbie in terms of scripting, so please don’t push hard on me. I am facing a challenge.

I want to have a macro that can do the followings jobs in one go: Image is attached for reference

  1. Select the objects shown, put all of them in Default layer
  2. Delete the other existing layers regardless of the names 0, layer 01 and layer 02
  3. Create three new layers A, B and C
  4. Transfer the objects red, blue and yellow to A, B and C… for this, the macro should ask about selection one by one

guys please help me out here. I have to do this for thousands of files.


Are you trying to do exactly as you described for exactly 3 layers, or is this a simplified example? Could it be any number of layers, colors, etc?

Here for testing but Rhinoscript (Windows)
Del_L.rvb (1.3 KB)

Thanks guys… i manage to do that :slight_smile: