Is it possible to use a variable in a command? Using Python3.
For example, I would like to use a variable as the parameters in the command such as:
G0 X100 Y100 Z100
Where the integers are replaced with variables:
G0 X"xvar" Y"yvar" Z"zvar"
I would appreciate any assistance.
Thanks
jjs6w
2
Since it is just a string, you can just use basic Python 3 syntax to convert integers to strings and then concatenate them. Here’s a tutorial I just googled: Python 3's f-Strings: An Improved String Formatting Syntax (Guide) – Real Python
Thank you for the clarification!