RobotStudio event

Cannot name face

This works OK when a body is selected:[CODE]private void SelectionChanged(object sender, GraphicPickEventArgs e)
// This method executes when an object is selected in the graphics pane
{
    Body body = e.PickedObject as Body;
    if (body != null)
    {
         body.Name = "body_1";
    }
}[/CODE] ... but 'face.Name = "face_1";' fails with a fatal error when a face is selected:[CODE]private void SelectionChanged(object sender, GraphicPickEventArgs e)
// This method executes when an object is selected in the graphics pane
{
    Face face = e.PickedObject as Face;
    if (face != null)
    {
         face.Name = "face_1";
    }
}[/CODE]
How do I name a face?

Thanks,

Kevin


Comments