Give Object a Name with Rhino Common?

Hi all,

I tried to Add a Name to a Object but it is not appearing in the Rhino UI but if i print it the object attribute.name exist.

import Rhino as rh

L = rh.RhinoDoc.ActiveDoc.Objects.FindByLayer('Line')
for i in L:
    print i.Attributes.Name
    i.Attributes.Name = 'Test' 
    print i.Attributes.Name


None
Test

A tip why the name dont appear in the object property panel is welcome

Unbenannt

Solution found

import Rhino as rh

L = rh.RhinoDoc.ActiveDoc.Objects.FindByLayer('Line')
for i in L:
    i.Attributes.Name = 'Test'
    att = i.Attributes
    rh.RhinoDoc.ActiveDoc.Objects.ModifyAttributes(i.Id,att,True)

Unbenannt

import rhinoscriptsyntax as rs

rs.ObjectName(object, name)

If you are using python inside the rhino python script editor.

I try to avoid rhinoscriptsyntax but thanks for your solution