On 25 Apr 2016, at 16:34, Hans Hagen > wrote: On 4/25/2016 3:46 PM, Meer, Hans van der wrote: Thanks, Your reply popped up here exactly the moment I saw the light! Must be something Messed up the order things: Was: \scale[\scalesetting]{% \expanded{\useMPgraphic{\xmlatt{#1}{name}}{\xmlatt{#1}{parameters}}}}% And of course had to be: \expanded{\scale[\scalesetting]{% \useMPgraphic{\xmlatt{#1}{name}}{\xmlatt{#1}{parameters}}}}% is the \expanded really needed? Sure, is needed. Checked it again. I define \scalesetting as \edef\scalesetting{scale=\xmlattdef{#1}{scale}{1000}} But I am not sure why this needs the expansion.. The enclosing \rotate[rotation=\xmlattdef{#1}{rotation}{0}]{...} does not need the \expanded. Hans van der Meer