TextDot Object Attributes

Happy new year to everyone!

I’m trying to draw coloured TextDots, but for some reason the dotObjAtt is not printing the dots. What I’m doing wrong? When I remove the dotObjAtt it works fine.
Should I create an object attribute for each object?
Any clue will be very much appreciated:

        //Print Points
        ObjectAttributes dotObjAtt = new ObjectAttributes();
        dotObjAtt.ColorSource = ObjectColorSource.ColorFromObject;
        
        int mRange = 255/lstEyes.Count;
        int con = mRange;

        foreach (Point3d[] group in lstEyes)
        {
            dotObjAtt.ObjectColor = Color.FromArgb(255, 255, 0,0);
            for (int i = 0; i < group.Length; i++)
                doc.Objects.AddTextDot(i.ToString(), group[i], dotObjAtt);

            mRange += con;
        }
        doc.Views.Redraw();

        return Result.Success;
    } 

Thanks in advance
Carlos.

Hi @cidelab,

This seems to work:

protected override Result RunCommand(RhinoDoc doc, RunMode mode)
{
  var attributes = doc.CreateDefaultAttributes();
  attributes.ColorSource = Rhino.DocObjects.ObjectColorSource.ColorFromObject;
  attributes.ObjectColor = Color.FromArgb(255, 0, 0);
  doc.Objects.AddTextDot("Test", Point3d.Origin, attributes);
  doc.Views.Redraw();
  return Rhino.Commands.Result.Failure;
}

– Dale

Thank you Dale,
I noted you have only 3 values in the FromArgb method and I have 4.
I will try that.

thanks Carlos.