Thanks for this request. The total number of layers is currently not a variable for the users to access in their scripting area. You can do as other users have done and display the layer number and height as a comment on the LCD using M117 and a replacement script.
viewtopic.php?t=4522#p19735
They tried to use:
I'd actually recommend using
Code: Select all
{REPLACE "; layer " "M117 Layer "}
as adding the space at the end of "; layer" will result in less errant matches when executing the search. This is because there are comments in the header which will begin with "; layer" but not with "; layer ".
Also, you can read over tip of the day 8 for more on scripting:
viewtopic.php?f=8&t=1959
"A bird does not sing because it has an answer. It sings because it has a song."