GHPython Component Issues

Hello,

I have a GhPython Script that takes in a bunch of curves as inputs. All of the inputs have list access. Some of the inputs are actually in the form of a list of curves whereas others contain just a single curve. When printing one of the inputs in the editor, I am noticing that the last few digits of this long string of numbers keeps changing. Downstream from this component I have a line that represents “Raker Beam 1”. But I do not notice the line moving or anything. I do not have screen recording capabilities otherwise I would show a video. But here is what I have.

Here is the line that I am printing out in Python.

This isn’t just happening to “Raker Beam 1”, but it is occurring on all of my inputs. Anyone know what could be the cause of this?

Thanks!

it’s normal behavior, it sort of communicates the position where the object is being momentarily stored in the memory

each time you make the component run (by changing its inputs, right-click Recompute or clicking the “Test” button) things get recomputed from scratch, so each object will have its own address

print() works well for data that can be read by human beings, like strings
if you need to output Geometries you might want to do that through a variable

for instance:
a = Raker_Beam_1
will make in such a way your output variable “a” contains the curves in Raker_beams_1

1 Like

Thanks for the response. But is it still normal behavior even when it occurs without having to press the “Test” button more than once? Based on the way you described this behavior, the location in which my “Raker Beam 1” curve is being momentarily stored in the computer is constantly changing without any action taken on my end. I click “Test” once, and then it just repeatedly changes without me having to press it again.

it happens each time the Python component executes, and it is normally asked to execute again if *any input of the Python component changes (even a change that happens upstream and somehow changes its inputs) or if the component is explicitally asked to recompute (“Test”, “Ok” or right-click → Recompute)

you should see the behavior of the Python component in your definition in one of the following cases:

the Trigger component will also do that:

consider attaching your GH file “as it is” inside the textbox where you are typing: it will attach your GH file for a better understanding of what you are experiencing