Dear Hans, I found a command \determinenoflines by googling. I made a MWE as following. It is working well. But I have to write the paragraph twice for couning. Is there a better way? Thank you again. Best regards, Dalyoung %%%%%%% \def\StartHide{\doifmode{hideSolution}{\starteffect[hidden]}} \def\StopHide{\doifmode{hideSolution}{\stopeffect\blank[\the\noflines*line + \the\noflines*halfline]}} \enablemode[hideSolution] \starttext The first line. \hrule \StartHide \samplefile{knuth} \determinenoflines{\samplefile{knuth}} \StopHide \hrule The second line. \hrule \StartHide \samplefile{ward} \determinenoflines{\samplefile{ward}} \StopHide \hrule The last line. \stoptext