Defines a function that gets a variable and returns its value

Hi Community,

Is it possible to define a function in a code block that gets a variable and return this as a project parameter?

In this fisrt case I tried to define the result of this operation as a function called “lot”. But when I create a code block to read this function it reads as “function: lot” and not as the value of this function. What to do? The same thing happens when I use a slider, as we can see in the image with the function called “oie”.

I also tried using the Prorubim package nodes, as we can see in the second image. In this second case i could only determine the value of the “ola” function that is associated with a integer slider. I could not determine the “hi” function associated with a var.

I want to create a function associated with a calculated var in an operation that can be used as a project parameter, just as I used the “ola” function.

Can someone help me?

It’s not possible. You cannot define a value in a function from an external input. What you’re seeing in the node preview is just the output from defining the variable outside the function.


You also don’t need to define an input if you only want a set output.

What a pity! But thank you very much for reply! :grinning: