Adding More Input/Output In Grasshopper Ghpython Component

Hello, i just started learning ghpython today and i am trying to practice by recreating my grasshopper script in python. I realized halfway that i cant add more input and output within python version of the ghcomponent. Normally in grasshopper you can add/remove more input or output just by clicking the +/- symbol. Can anyone tell me how to add more input/output for grasshopper component in python?

here is the error msg i got

Error: Runtime error (ArgumentException): Cross Reference: Expected at most 2 arguments, but got 3.

Parameter name: args

Rebar Cutting Length.gh (25.3 KB)

when I open your script I see this, no errors popping up:

@Georgius_Michael Not sure what is stuck on that component but it is the legacy python. I noticed if I toggle the ‘out’ parameter on and off, it resets the parameter configs and the +/- symbols come back

Your file seems to work on my system too. That said, using ghpythonlib.components for everything is a surefire way to write impossible to debug and strange behaving code. I’d recommend using native Python functionality when writing GHPython. And only resorting to ghpythonlib.components when the required functionality is not available in the standard Python library, .NET and RhinoCommon/rhinoscriptsyntax.

I am sorry! i send the wrong file, here is the correct one. Could you help me with this?

Rebar Cutting Length (1).gh (30.3 KB)

In this case, the error seems pretty straight forward:

That is, you’re passing one argument too many to the CrossReference function, I think.

Yeah i understand about the error, what i dont understand is if it is actually possible to add more argument(input/output) just like when i use +/- icon on the grasshopper component version