Panel in grasshopper

how can i change the format of a Input panel from {0} to {0;0}.
if you look at the up right corner of a panel you will understand what i mean :slight_smile:

Hi,

By Input Data

Cheers,
BVR

i want to use the panel as the first input data so there is no input for my panel. in other word it is the first input for the all the grasshopper

This represents Branch path/ Path of each list. No possible way to change it first.

1 Like

one more question:
is there any way to have a matrix as and input?
like
[1,2,3;4,5,6]

Does this help. It covers direct input syntax for trees and the use of mapper. Either strategy might work:

the way that you mentioned @scottd would change the format (layout) of the panel. but the panel any how will be treated as a bunch of individual numbers. like in my case i want to have matrix as an input for python. i like python consider whole the panel as a variable then i can run som loops on the rows and columns.

Can you show us a simple example of what you are trying to do with a setup and Python component? There are a few ways to do this, but we are all guessing.

You can use Type Hint on the input to get a list.

You can import the whole as a string then parse thru it.

But it is hard to see what is an acceptable solution from this distance.

well, if it was normal Python, it would look like this:

for i in range(len(x)):
… a=a+x[i]-y[i]

It is not normal Python. It is Python running inside a Grasshopper component.

In this case Grasshopper has a scheme of data-matching that is critical to how grasshopper works. So the panels reflect this explicit organization. Of course this works too:

what you are saying is that the python in Grasshopper can not work with matrices, if i understand right.
because the example you have attached, for me, is a series of scalar calculation listed in a column (panel). it is not at all a matrix calculation.
one thing more:
in the python example you mentioned above; can you run this script instead:
a=a+x-y

You can build a matrix in grasshopper with the matrix class and then apply functions from the following library:

or you can build a matrix in grasshopper:
image

I think you are mixing data trees with matrices.

@scottd the document about python helped a lot.
the solution is selectiong the “List Access” as the input format.

1 Like

i will give it a try.
thank you for the helo :+1: