On 2013–03–16 Thomas A. Schmitz wrote:
I'm not quite sure if this is what you're looking for, but here is an example how you could do this with \MPvars:
\def\Circlediameter{15mm}
\def\setupCircle#1[#2]% {\getparameters[Circle][diameter=15mm,#2]}
\setupMPvariables [mycircle] [diameter=\Circlediameter, ]
\startuseMPgraphic{mycircle} fill unitcircle scaled \MPvar{diameter} withcolor red ; \stopuseMPgraphic
The above works in the larger document, but a construct like this fails: \startuseMPgraphic{mycircle} mysize := \MPvar{diameter}; fill unitcircle scaled mysize withcolor red ; \stopuseMPgraphic However, in the minimal example it works, too. So the problem lies be somewhere else. I will investigate why it fails. I like the MPvar solution and try to get it working. Thanks Marco