Python method ObjectColor returns error


(Willem Derks) #1

Hi,

When running this code:

import rhinoscriptsyntax as rs

objs = rs.GetObjects("Select objects to change color")
if objs:
    color = rs.GetColor(0)
    if color:
        for obj in objs: rs.ObjectColor( obj, color )

I get the error

Message: list is not callable

The error ris raised when running the line with rs.ObjectColor()
It’s working in V5 and not in V6

HTH
-Willem


(Alain Cormier) #2

Hmmm. I copy and pasted your code and it works for me in R5 and 6


(Willem Derks) #3

Hi Alain

Thanks for looking into this.
I just tested again and it is working now…
wierd, I reported because I tried at least 4 or 5 times and all failed.

Next time I see if a restart helps and/or report back.

thanks
Willem