Selecting all spheres in a project

rhino
help
python

#1

hello, I am trying to select all the spheres in a project how would i do that?


#2

Try do it the same way i suggested yesterday for finding all points in a document, just modify what u filter for.

/Jakob


#3

thanks for the help. ok I managed to select all the spheres in the project using the same script I used to delete points. whats stumping me is how to get them to change layers

import Rhino
import scriptcontext as sc
import rhinoscriptsyntax as rs
import math as ma

def Move_Sphere():
    objs = rs.AllObjects()
    for obj in objs:
        if rs.IsSphere(obj):
            rs.DeleteObject(obj)

Move_Sphere()

as you can see I got all the spheres but I am deleting them! all I want to do is move them to the layer “Audio Evaluation”


#4

nvm figured it out

def Move_Sphere():
    layer="Audio Evaluation"
    objs = rs.AllObjects()
    for obj in objs:
        if rs.IsSphere(obj):
            rs.ObjectLayer(obj,layer)

thanks