get name of current module/function?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

get name of current module/function?

adrianv
Is there a way to get the name of the current module or function, like a
$mod_name variable?  This would make it a little easier to write error
messages in a generic way that would continue to work if someone changed the
module's name.




--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: get name of current module/function?

nophead
Yes:
 echo(parent_module(0));

On Sun, 11 Aug 2019 at 22:04, adrianv <[hidden email]> wrote:
Is there a way to get the name of the current module or function, like a
$mod_name variable?  This would make it a little easier to write error
messages in a generic way that would continue to work if someone changed the
module's name.




--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org