Create TextEntity no longer working Version 8 SR29

In the latest Version 8 SR29 (8.29.26063.11001, 2026-03-04), when creating a TextEntity with C# code in Grasshopper, all given attributes is ignored and only global attributes are used for size and justification.

    `TextEntity = new TextEntity`

{
Plane = plane,
PlainText = text,
Font = new Font(font),
TextHeight = size,
Justification = TextJustification
};

I have been using it like this for a while, and it has worked flawless up until now. Is this a bug or an intentional change, and how can I solve it?

Hi @anders.rudfoss,

This is v8.29 here.


Test-TextEntity.gh (21.1 KB)

Could you please share a .gh file that replicates what you describe here?
What do you mean by are ignored?
Thanks.

Hi Kike Garcia

I am quite confused now as to what it can be. This is my test file, where I have my original component that is basically the same as in the C# components, below. But as you can se one of the C# components work. The other one does not, for some reason.

I have tried to update the nuGet packages, but that did not help. And this problem started with version 8.29.

Text size and justification test.gh (15.7 KB)

The scripting component that do not work is because the user is not providing a ‘textPlane’, so you get a Null Plane on the script.
Creating a Text Entity from a Null Plane results in an Invalid Text Entity.

Sorry about that. That was a silly mistake by me. It does however not fix the underlining issue with my other component. The one I made for myself, is a small par of a bigger mor complex setup, but is fundamentally just the text part for this. Witch is why I need to figure this out.

Here is the code in the component and linked modules:
public class Comp2DText : GH_Component
{

public Comp2DText()
  : base("Lag tekst på plan",
        "I-tekst",
        "Skriver tekst inputt på plassering",
        "Ilder",
            "A. Ilder verktøy")
{ }

protected override System.Drawing.Bitmap Icon => Icons.IlderText;
public override GH_Exposure Exposure => GH_Exposure.tertiary;
public override Guid ComponentGuid => new Guid("A9E03FD2-AFF3-4E5F-A949-6F34F4134036");


protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
{
    pManager.AddTextParameter("Tekst", "T", "Tekst som skal plasseres", GH_ParamAccess.item);
    pManager.AddNumberParameter("Størrelse", "S", "Teksthøyde", GH_ParamAccess.item, 0.5);
    pManager.AddTextParameter("Font", "F", "Font på tekst", GH_ParamAccess.item, "Calibri");
    pManager.AddPlaneParameter("Plan", "P", "Plassering av tekst", GH_ParamAccess.item, Plane.WorldXY);
    pManager.AddNumberParameter("Tekst plassering", "Tp", "0 = Topp venstre, 1 = Topp midten, 2 = Topp Høyre, 3 = Midten venstre, 4 = Senter, 5 = Midten, høyre, 6 = Bunn venstre, 7 = Bunn midten, 8 = Bunn høyre", GH_ParamAccess.item, 0);
}
protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager pManager)
{
    pManager.AddParameter(new Param_TextEntity(), "Tekst atributt", "TA", "Tekst plassert i Rhino for informasjon eller for tegninger", GH_ParamAccess.item);
}

protected override void SolveInstance(IGH_DataAccess DA)
{
    var tekst_streng = "";
    var tekst_font = "";
    double størrelse = 1;
    Plane plan = new Plane();
    double plassering = 0;

    DA.GetData(0, ref tekst_streng);
    DA.GetData(1, ref størrelse);
    DA.GetData(2, ref tekst_font);
    DA.GetData(3, ref plan);
    DA.GetData(4, ref plassering);

    tekst_på_plan tekst = new tekst_på_plan(tekst_streng, tekst_font, størrelse, plan, Int32.Parse(plassering.ToString()));                

    DA.SetData(0, tekst.TextEntity);
}
}

public class tekst_på_plan

    public string Tekst { get; set; }
    public string Font { get; set; }
    public double Størrelse { get; set; }
    public Plane Plan { get; set; }
    public int Plassering { get; set; }
    public TextEntity TextEntity { get; set; }
 public tekst_på_plan(string tekst, string font, double størrelse, Plane plan, int plassering)
 {
     Tekst = tekst;
     Font = font;
     Størrelse = størrelse;
     Plan = plan;
     Plassering = plassering;

     if (størrelse <= 0.000001)
     {
         størrelse = 0.000001;
     }

     TextEntity = new TextEntity
     {
         Plane = plan,
         PlainText = tekst,
         Font = new Font(font),
         TextHeight = størrelse,
         Justification = tekst_plassering(plassering)
     };
 }
    public static TextJustification tekst_plassering(int plassering)
    {
        return tekst_plassering_liste()[plassering];
    }

    public static List<TextJustification> tekst_plassering_liste()
    {
        var Justification = new List<TextJustification>
        {
            TextJustification.TopLeft, //0
            TextJustification.TopCenter, //1
            TextJustification.TopRight, //2
            TextJustification.MiddleLeft, //3
            TextJustification.MiddleCenter, //4
            TextJustification.MiddleRight, //5
            TextJustification.BottomLeft, //6
            TextJustification.BottomCenter, //7
            TextJustification.BottomRight  //8
        };

        return Justification;
    }

As you can see the code is basically the same, only divided up in smaller parts (and some in Norwegian).

@anders.rudfoss,

I don’t see any issue on your code, but still don’t understand what do you mean by “all given attributes is ignored and only global attributes are used for size and justification.” from your original post.

The green preview you show look correct.
Isn’t it?

Could you please explain what is not as you expect?

Both text in the example is given the same input, but only the text for the C# component actually move and change size when inputs are change (at least for us)

However, if i go in to Rhino Options and change the Model space scale it does change the text

So it is possible to change it, but all text I generate can only be change by doing this, and it is global for all text, meaning if I want text in different sizes I am in big trouble.

I see now.
This will be fixed in v8.30 available tomorrow.

Thanks for reporting.

Thank you :blush:

Hi.

Any update on this yet?

I am on version (8.30.26096.12181, 2026-04-06) now and the problem is still there.

Hi @anders.rudfoss,

This is your code running in 8.31.

Unfortunately, the fix landed on 8.31.