algorithmic modeling for Rhino
As the title says, is there any way to put a Grasshopper Panel() with text in the canvas by vb code?
Perhaps you could save your solution as a .ghx file and then insert it as xml ? either through a second grasshopperscript or seperate rhino plugin that opens and writes the file ?
Actually there is a way to integrate a GH_Panel but it's probably not what you need in this case.
I think what you need it's override your component's display (Attributes) and display your text.
You can also write your text in the balloon as warning or errors, probably the best if it's for input format.
this.AddRuntimeMessage(GH_RuntimeMessageLevel.Error, "Your text");
Well you can do it like this : document.AddObject(new GH_Panel())
But it will be a bit complex to manage everything, like position and also far from the basic rules of grasshopper.
It would be much simpler to have a string output with your text and connect it to a panel.
to add text I think you can try:
panel.Attributes.Pivot = new PointF("xPosition,yPosition");
I don't understand why you can't have a output for format errors and another for your merge result?
Sorry, I'm not sure of your last request?
Dim doc As GH_Document
doc = Grasshopper.Instances.ActiveCanvas.Document
Special.GH_Panel panel =New Special.GH_Panel()
doc.AddObject(panel , True)
panel.Attributes.Pivot = new PointF(this.Attributes.Pivot);
And if you can determinate the format and give it to the user, why not just force it and dont ask to the user to do it?