@eirannejad
not sure if know, but auto gen C# nodes with comment in param input cause small bug, see attach images and snippet. When i paste code below in empty node,
#region Usings
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Rhino;
using Rhino.Geometry;
using Grasshopper;
using Grasshopper.Kernel;
using Grasshopper.Kernel.Data;
using Grasshopper.Kernel.Types;
#endregion
public class Script_Instance : GH_ScriptInstance
{
private void RunScript(
Brep target_brep,
int curve_direction, // ADD THIS INPUT: 0 for U, 1 for V
int n_count,
int iterations)
{
}
}
On that note - since you say you are learning:
You wouldnât usually write comments in between function argument like this. At least not in typical style people use with C#.
If you want add comments about arguments, what you will see used in practice, are these tripple slash âdocstringâ comments. If you use an IDE (like Visual Studio), these will then also be shown in the tooltip when you hover over a function name or itâs arguments.
/// <summary> This function does something... </summary>
/// <param name="curve_direction">0 for U, 1 for V.</param>
private void RunScript(
Brep target_brep,
int curve_direction,
int n_count,
int iterations)
{
}
happens while blindly copy / pasting from chat windows also happens sonetime when using dedicate AI plugins. Am probably not the first, and yes blame the user :0, but if it can be handle in editor side it would be more user friendly Notice it place the comment on a new line , replacing an input parms that is actually needed. @eirannejad>left C# editor > right AI dialog