problem with ramping diameter

Hello,
I'd like to ramp the diameter of particles within the region reg1 by these commands:

variable dia equal ramp(0.03,0.04)
region reg1 block -0.7 0.7 -1.5 -1.4 -0.0002 0.002 units box
run 50000 start 1000 stop 500000 every 1000 "set region reg1 diameter ${dia}"

Unfortunately, I get this error:
"Group ID in variable formula does not exist"

Can anybody help me? Where is the problem?

Thanks in advance,
kind regards,

Sebastian

Putting these commands at the end of the bench/in.lj script works
as expected:

variable dia equal ramp(0.03,0.04)
region reg1 block -0.7 0.7 -1.5 -1.4 -1 1 units box
run 100 start 0 stop 100 every 10 "print ${dia}"

Are you using the current version of LAMMPS?

Steve