Script file variable description

Hello,

How can you create a variable description in a script file that is then also displayed in Polycope?

In a script, a variable is created using: “global Var_1=0” which is displayed in Polycope.

Unfortunately, I cannot add a description to the script that is then created in Polycope. Is this possible in any way?

There isn’t a way to add a description like you can in the UI that I am aware of. We choose to use descriptive variable names in our scripts and only expose ones as global that we want to be able to track in the variables window on the UI.

So instead of something like Var_1 we will use something like isGripperOpen. Also, we use camel case as it allows us to use all of the characters available instead of using underscores in the variable name.

If the description is important, you could always create the variables in polyscope and then consume them in the script that you create since all polyscope variables are global

If I remember correctly, we’ve sometimes struggled with the controller thinking there were duplicate variable names if we had the variables in polyscope and in the script - I think it had to do with either order of creation or what files were open when we were creating/editing the variables.
I think that you want to make sure that you create/edit the variable in Polyscope without having any scripts loaded which reference that same variable.
Is there a difference between creating/editing a variable in the Variables Setup in the Program tab vs. in the Installation>Variables tab?

Hello and thank you for your answers,

it’s a shame that it doesn’t work the way I thought it would. I know the other ways. Thank you very much