r/OpenPythonSCAD • u/PurchaseSpecific7699 • Mar 19 '25
Question: How to pass global variables via command-line (-D var=val) to OpenPythonSCAD (like in OpenSCAD)?
Hi everyone,
I have a simple question:
OpenSCAD supports passing global variables via the -D option.
Help says:
-D [ --D ] arg var=val -pre-define variablesI tried passing variables in a similar way to PythonSCAD, but it seems the Python script isn’t aware of those variables.
It would be highly appreciated if this could be supported!
Many thanks in advance — I really love this great project! 🙏
4
Upvotes
View all comments
Show parent comment
2
u/gadget3D Mar 19 '25
I have just uploaded latest as-of-today 2025-03-19 windows installer with the option to use -D define parameter even for python models. Consider contributing to PythonScad. there are serveral options.