Start panel from 1 not 0

Hey Guys!
I would like to know is it possible a panel start at 1 not zero? I need import some of point into Ansys classic but Ansys don not accept zero key point.
In advance thank you!
panel|604x500

The index numbers in the first column, always starting with zero, are not actually present in the panel content. They are the zero-based position in the list that comprises each branch of a data tree. I have no idea what “Ansys” is but it will never see these index values shown in the panel, only the data that follows on each line.

Thank you Joseph for your kind response!
I need to have this index numbers and start as 1, as it could be seen it start at 0. And Ansys software(Engineering Simulation & 3D Design Software) could not recognize key point as number 0.
Is there any way to change the base start at 1 instead of 0?
Thank for your answers.

I think you don’t understand yet… The data you have circled in red is a point with X, Y and Z coordinates in curly braces, separated by commas. The leading zero that you prefer to be one is not in the panel/data so is not seen by Ansys. Sounds like Ansys doesn’t recognize the point?

Is it possible that you are running data through text panels? That would be bad! Unless you explicitly want to pass text to Ansys, don’t do that. Text panels should be used as view-only tools, not connected inline with data since it will always emerge as text, losing the “raw” data.type (point in this case).

I understood what you said. I meant Ansys don’t accept a key point as 0, and it would be start at 1. From this panel I took the X,Y,Z coordinates point from 0 up to …, but when I imported in ansys the key point started from 1 and Ansys would not to specify number 0. Therefore, for each number I have to add 1 digit more to calculate correct number and I should spend more time for that.
Thank you Joseph!

It depends on how you export to Ansys.

You may use Pathmapper to do the thing but there would be an empty 0-indexed entry, which I don’t know how Ansys will deal with that.

The correct way to do it is, when you export it from Grasshopper to Ansys, add one at the final step.

Thanks a lot Keyu Gan
You have been very helpful!
I’ve solved the mentioned problem by your recommendation.

1 Like

Who would have guessed? Sounds like Ansys isn’t aware of Grasshopper conventions?

This is a different way to insert a ‘null’ at the zero (or any) position of a list: Insert Items

insert_null

1 Like

Thank you Joseph!
After got the text from grasshopper, the 0 value would be removed to import to ansys.
best regards

From memory:
k,kp#, x-coord, y-coord, z-coord
is the ansys point input.
http://www.mm.bme.hu/~gyebro/files/ans_help_v182/ans_cmd/Hlp_C_K.html

I would just use python to generate it:

for i,pt in enumerate(x):
    print "k, " + str(i+1) + "," + str(pt.X) + "," + str(pt.Y) + "," + str(pt.Z)

where x is a flat list of type point3d input.