Following-up this answer, I would like to:
1- specify the length over which the dots are spread
2- and center them in addition to controlling both the left and right margin skips.
\documentclass{exam}
\makeatletter
\newcount\my@repeat@count
\newcommand{\myrepeat}[2]{%
\begingroup
\my@repeat@count=\z@
\@whilenum\my@repeat@count<#1\do{#2\advance\my@repeat@count\@ne}%
\endgroup
}
\makeatother
\newcount\myloopcounter
\newcommand{\repeatit}[2][10]{%
\myloopcounter0% initialize the loop counter
\loop\ifnum\myloopcounter < #1 % Test if the loop counter is < #1
#2%
\advance\myloopcounter by 1 %
\repeat % start again
}
\usepackage{mdframed}
\newenvironment{mymdf}
{\mdfsetup{
innertopmargin=15pt
}
\begin{mdframed}%
}
{\end{mdframed}}
\begin{document}
\begin{questions}
\question Question
\begin{mymdf}
\repeatit[3]{\myrepeat{150}{.}\\} %3 row, 150 dot per row.
\end{mymdf}
\end{questions}
\end{document}