It is currently April 18th, 2024, 10:33 am

Degree symbol getting translated

Get help with creating, editing & fixing problems with skins
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5391
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Degree symbol getting translated

Post by eclectic-tech »

Get rid of your measure to "initialize" the scale, just set the variable in the skin.

In order to have a dynamic variable used in a bang in a meter, you cannot set the UpdateDivider to -1 on that meter (the variable change is never seen). So remove 'UpdateDivider=-1' from all three background meters.

When setting a variable using a formula, it is a good practice to use 'Clamp' to limit the range. Without that, I lost your skin off the screen completely while scaling.

Finally, you set all 3 weather meters to UpdateDivider=-1, which is fine if you are displaying a static image, but they never will change in response to a change of the SCALE variable with that setting, so remove those also.

Here is the [Variables] section and the background sections with clamp action (remember to remove UpdateDivider=-1 from the weather meters).

Code: Select all

[Variables]
;Change next line to your zip code
Zip=90210
;How often to update weather (15 minutes)
UpdateWeatherSeconds=900
;The higher InitScale the smaller the widget
;Sorry, by the time I realized Calc was worthless for my needs I was stuck backwards
Scale=1
;Change to 1 for Clock to stay hidden in refresh. Same for Date and Weather.
TimeHidden = 0
DateHidden = 0
WeatherHidden = 0

White=255,255,255,255
Yellow=255,255,80,255
Black=0,0,0,255

[DisplayStyle1]
Meter=String
FontColor=#Yellow#
FontFace=Diner
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=#Black#

; [Initialize]
; Measure=Calc
; OnUpdateAction=[!SetVariable Scale #InitScale#]
; DynamicVariables=1
; UpdateDivider=-1

[BackgroundTime]
Meter=Shape
Shape=Rectangle 0,(17/#Scale#),(280/#Scale#),(45/#Scale#) | Fill Color 220,20,20,1  | StrokeWidth 0
LeftMouseDoubleClickAction=[!ToggleMeter MeterTime][!ToggleMeter MeterTimeMarker]
MouseScrollDownAction=[!SetVariable Scale (Clamp(#Scale#-0.25,0.25,4))]
MouseScrollUpAction=[!SetVariable Scale (Clamp(#Scale#+0.25,0.25,4))]
DynamicVariables=1
;UpdateDivider=-1

[BackgroundDate]
Meter=Shape
Shape=Rectangle 0,(63/#Scale#),(280/#Scale#),(40/#Scale#) | Fill Color 20,220,20,1 | StrokeWidth 0
LeftMouseDoubleClickAction=[!ToggleMeter MeterDate][!ToggleMeter MeterMonth][!ToggleMeter MeterDay][!ToggleMeter MeterDateMarker]
MouseScrollDownAction=[!SetVariable Scale (Clamp(#Scale#-0.25,0.25,4))]
MouseScrollUpAction=[!SetVariable Scale (Clamp(#Scale#+0.25,0.25,4))]
DynamicVariables=1
;UpdateDivider=-1

[BackgroundWeather]
Meter=Shape
Shape=Rectangle 0,(104/#Scale#),(280/#Scale#),(40/#Scale#) | Fill Color 20,20,220,1 | StrokeWidth 0
LeftMouseDoubleClickAction=[!ToggleMeter MeterTemp][!ToggleMeter MeterDesc][!ToggleMeter MeterWeatherHumidity]
MouseScrollDownAction=[!SetVariable Scale (Clamp(#Scale#-0.25,0.25,4))]
MouseScrollUpAction=[!SetVariable Scale (Clamp(#Scale#+0.25,0.25,4))]
DynamicVariables=1
;UpdateDivider=-1

User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Degree symbol getting translated

Post by balala »

eclectic-tech wrote:In order to have a dynamic variable used in a bang in a meter, you cannot set the UpdateDivider to -1 on that meter (the variable change is never seen). So remove 'UpdateDivider=-1' from all three background meters.
Sorry eclectic-tech, I don't completely agree. If you're set the UpdateDivider of a meter (or even measure) to -1, it's true that meter (measure) isn't usually updated, but can be, using the !UpdateMeter (!UpdateMeasure), or the !Update bang. Just have to add them to the right place. Eg, even if you leave the UpdateDivider=-1 on all three meters ([BackgroundTime], [BackgroundDate] and [BackgroundWeather]), they can work if you add the needed !UpdateMeter bangs:

Code: Select all

[BackgroundTime]
Meter=Shape
Shape=Rectangle 0,(17/#Scale#),(280/#Scale#),(45/#Scale#) | Fill Color 220,20,20,1  | StrokeWidth 0
LeftMouseDoubleClickAction=[!ToggleMeter "MeterTime"][!ToggleMeter "MeterTimeMarker"]
MouseScrollDownAction=[!SetVariable Scale "(#Scale#-0.25)"][!UpdateMeter "BackgroundTime"][!UpdateMeter "BackgroundDate"][!UpdateMeter "BackgroundWeather"][!Redraw]
MouseScrollUpAction=[!SetVariable Scale "(#Scale#+0.25)"][!UpdateMeter "BackgroundTime"][!UpdateMeter "BackgroundDate"][!UpdateMeter "BackgroundWeather"][!Redraw]
DynamicVariables=1
UpdateDivider=-1

[BackgroundDate]
Meter=Shape
Shape=Rectangle 0,(63/#Scale#),(280/#Scale#),(40/#Scale#) | Fill Color 20,220,20,1 | StrokeWidth 0
LeftMouseDoubleClickAction=[!ToggleMeter "MeterDate"][!ToggleMeter "MeterMonth"][!ToggleMeter "MeterDay"][!ToggleMeter "MeterDateMarker"]
MouseScrollDownAction=[!SetVariable Scale "(#Scale#-0.025)"][!UpdateMeter "BackgroundTime"][!UpdateMeter "BackgroundDate"][!UpdateMeter "BackgroundWeather"][!Redraw]
MouseScrollUpAction=[!SetVariable Scale "(#Scale#+0.025)"][!UpdateMeter "BackgroundTime"][!UpdateMeter "BackgroundDate"][!UpdateMeter "BackgroundWeather"][!Redraw]
DynamicVariables=1
UpdateDivider=-1

[BackgroundWeather]
Meter=Shape
Shape=Rectangle 0,(104/#Scale#),(280/#Scale#),(40/#Scale#) | Fill Color 20,20,220,1 | StrokeWidth 0
LeftMouseDoubleClickAction=[!ToggleMeter "MeterTemp"][!ToggleMeter "MeterDesc"][!ToggleMeter "MeterWeatherHumidity"]
MouseScrollDownAction=[!SetVariable Scale "(#Scale#-0.025)"][!UpdateMeter "BackgroundTime"][!UpdateMeter "BackgroundDate"][!UpdateMeter "BackgroundWeather"][!Redraw]
MouseScrollUpAction=[!SetVariable Scale "(#Scale#+0.025)"][!UpdateMeter "BackgroundTime"][!UpdateMeter "BackgroundDate"][!UpdateMeter "BackgroundWeather"][!Redraw]
DynamicVariables=1
UpdateDivider=-1
Another thing which should be taken into account is the using of quotations. In the above code I also added them, but users should get to used to use them. Can avoid a lot of headaches in many circumstances.
User avatar
Codger
Posts: 97
Joined: May 29th, 2017, 3:16 pm

Re: Degree symbol getting translated

Post by Codger »

balala wrote:

Code: Select all

Meter=Shape
Shape=Rectangle 0,(17/#Scale#),(280/#Scale#),(45/#Scale#) | Fill Color 220,20,20,1  | StrokeWidth 0
LeftMouseDoubleClickAction=[!ToggleMeter "MeterTime"][!ToggleMeter "MeterTimeMarker"]
MouseScrollDownAction=[!SetVariable Scale "(#Scale#-0.25)"][!UpdateMeter "BackgroundTime"][!UpdateMeter "BackgroundDate"][!UpdateMeter "BackgroundWeather"][!Redraw]
MouseScrollUpAction=[!SetVariable Scale "(#Scale#+0.25)"][!UpdateMeter "BackgroundTime"][!UpdateMeter "BackgroundDate"][!UpdateMeter "BackgroundWeather"][!Redraw]
DynamicVariables=1
UpdateDivider=-1

[BackgroundDate]
Meter=Shape
Shape=Rectangle 0,(63/#Scale#),(280/#Scale#),(40/#Scale#) | Fill Color 20,220,20,1 | StrokeWidth 0
LeftMouseDoubleClickAction=[!ToggleMeter "MeterDate"][!ToggleMeter "MeterMonth"][!ToggleMeter "MeterDay"][!ToggleMeter "MeterDateMarker"]
MouseScrollDownAction=[!SetVariable Scale "(#Scale#-0.025)"][!UpdateMeter "BackgroundTime"][!UpdateMeter "BackgroundDate"][!UpdateMeter "BackgroundWeather"][!Redraw]
MouseScrollUpAction=[!SetVariable Scale "(#Scale#+0.025)"][!UpdateMeter "BackgroundTime"][!UpdateMeter "BackgroundDate"][!UpdateMeter "BackgroundWeather"][!Redraw]
DynamicVariables=1
UpdateDivider=-1

[BackgroundWeather]
Meter=Shape
Shape=Rectangle 0,(104/#Scale#),(280/#Scale#),(40/#Scale#) | Fill Color 20,20,220,1 | StrokeWidth 0
LeftMouseDoubleClickAction=[!ToggleMeter "MeterTemp"][!ToggleMeter "MeterDesc"][!ToggleMeter "MeterWeatherHumidity"]
MouseScrollDownAction=[!SetVariable Scale "(#Scale#-0.025)"][!UpdateMeter "BackgroundTime"][!UpdateMeter "BackgroundDate"][!UpdateMeter "BackgroundWeather"][!Redraw]
MouseScrollUpAction=[!SetVariable Scale "(#Scale#+0.025)"][!UpdateMeter "BackgroundTime"][!UpdateMeter "BackgroundDate"][!UpdateMeter "BackgroundWeather"][!Redraw]
DynamicVariables=1
UpdateDivider=-1
Using this, and adding the Clamp from the previous poster's example, that problem was fixed :thumbup: - except for the weather didn't size properly but I was able to figure that out. :bow:

However, while I came to understand the changes and the reasons behind them, I do not understand why it had originally worked flawless for a single tick in either direction. Seemed like it should've worked or not worked, if I truly understood correctly.

So sadly after some fixing, and cleaning and simplifying, suddenly I am right back where I started. It works for a single click forward or backward. There is a clue in that. But I can't see it. I assume that the problem is in:
[!SetVariable Scale [ScaleDown]]
as even to my eyes [] around ScaleDown looks wrong. However if I leave them off or put them in quotes I get the literal string ScaleDown as the value of Scale. What is the correct syntax?

Code: Select all

[ScaleDown]
Measure=Calc
Formula=(Clamp(#Scale#-0.05,0.75,2))

[ScaleUp]
Measure=Calc
Formula=(Clamp(#Scale#+0.05,0.75,2))

;===Backgrounds
[BackgroundTime]
Meter=Shape
Shape=Rectangle 0,(17/#Scale#),(280/#Scale#),(45/#Scale#) | Fill Color 220,20,20,1  | StrokeWidth 0
Group=BackgroundGroup
LeftMouseDoubleClickAction=[!ToggleMeterGroup TimeGroup]
MouseScrollDownAction=[!SetVariable Scale [ScaleDown]][!UpdateMeterGroup BackgroundGroup][!UpdateMeterGroup WeatherGroup][!Redraw]
MouseScrollUpAction=[!SetVariable Scale [ScaleUp]][!UpdateMeterGroup BackgroundGroup][!UpdateMeterGroup WeatherGroup][!Redraw]
DynamicVariables=1
UpdateDivider=-1
balala wrote:Another thing which should be taken into account is the using of quotations. In the above code I also added them, but users should get to used to use them. Can avoid a lot of headaches in many circumstances.
If you'd be so kind, please elaborate. Can you give a couple simple examples of where it would cause unobvious headaches?

Thanks again.
[hr][/hr][hr][/hr]
"If you are the smartest one in the room, you are in the wrong room."
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5391
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Degree symbol getting translated

Post by eclectic-tech »

Codger wrote:So sadly after some fixing, and cleaning and simplifying, suddenly I am right back where I started.
Please post your entire modified code...
Codger wrote:Can you give a couple simple examples of where it would cause unobvious headaches?

Thanks again.
The best example would be when using Path Variables in your code.

Let's say you want to use @include to insert a set of common variables into the [Variables] section... you type @include=#@#commonvariables.inc in your code, right?

But, what if the user name contains SPACES?!! Your bang will fail because the SPACE will be interpreted as the end...
@include="#@#commonvariables.inc"

ALWAYS enclose path variables inside quotation marks. Balala suggests enclosing all parameters of a bang in quotes, which will avoid these not so obvious possible issues when others use your skin.

@balala

Yes, adding bangs to update measures and meter along with redraw will work, but as we see, after Codger made changes, he is right back where he started :x

Get it working without trying to minimize workload (using UpdateDivider=-1), then go back and optimize AFTER it is working...
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Degree symbol getting translated

Post by balala »

Codger, read eclectic-tech's very good (as usual) reply.

eclectic-tech, you're right and I'm curious why. So, I say exactly what you did:
eclectic-tech wrote:Please post your entire modified code...
User avatar
Codger
Posts: 97
Joined: May 29th, 2017, 3:16 pm

Re: Degree symbol getting translated

Post by Codger »

balala wrote:Codger, read eclectic-tech's very good (as usual) reply.

eclectic-tech, you're right and I'm curious why. So, I say exactly what you did:
Will do. And here is the code. Feel free to add any critiques too. I think I'm at that point in my learning...

Code: Select all

; double click on time, date or weather to turn off
; double click again WHERE THEY WERE to turn back on
; add your zip code on line 24

; I think weather is only US and definitely would need a touch of recoding for Celcius. If you want to disable the weather change WeatherHidden to 1.  

[Rainmeter]
Update=1000
DynamicWindowSize=1
MiddleMouseDownAction=!DeactivateConfig

[Metadata]
Name=Hideaway Blob Clock
Author=Codger
Config=
Instructions=
Version=1.2.2
License=License=Creative Commons Attribution - Non - Commercial - Share Alike 3.0
Variant=
Preview=

[Variables]
;Change next line to your zip code
Zip=90210
;How often to update weather (15 minutes)
UpdateWeatherSeconds=900
;The higher InitScale the smaller the widget
;Sorry, by the time I realized Calc was worthless for my needs I was stuck backwards
Scale=1.2
;Change to 1 for Clock to stay hidden in refresh. Same for Date and Weather.
TimeHidden = 0
DateHidden = 0
WeatherHidden = 0
;
White=255,255,255,255
Yellow=255,255,80,255
Black=0,0,0,255

;===Styles
[DisplayStyle1]
Meter=String
FontColor=#Yellow#
FontFace=Diner
StringStyle=Bold
StringEffect="Shadow"
FontEffectColor=#Black#

;===Formulas
[ScaleDown]
Measure=Calc
Formula=(Clamp(#Scale#-0.05,0.75,2))

[ScaleUp]
Measure=Calc
Formula=(Clamp(#Scale#+0.05,0.75,2))

;===Backgrounds
[BackgroundTime]
Meter=Shape
Shape=Rectangle 0,(17/#Scale#),(280/#Scale#),(45/#Scale#) | Fill Color 220,20,20,1  | StrokeWidth 0
Group=BackgroundGroup
LeftMouseDoubleClickAction=[!ToggleMeterGroup TimeGroup]
MouseScrollDownAction=[!SetVariable Scale [ScaleDown]][!UpdateMeterGroup BackgroundGroup][!UpdateMeterGroup WeatherGroup][!Redraw]
MouseScrollUpAction=[!SetVariable Scale [ScaleUp]][!UpdateMeterGroup BackgroundGroup][!UpdateMeterGroup WeatherGroup][!Redraw]
DynamicVariables=1
UpdateDivider=-1

[BackgroundDate]
Meter=Shape
Shape=Rectangle 0,(63/#Scale#),(280/#Scale#),(40/#Scale#) | Fill Color 20,220,20,1 | StrokeWidth 0
Group=BackgroundGroup
LeftMouseDoubleClickAction=[!ToggleMeterGroup DateGroup]
MouseScrollDownAction=[!SetVariable Scale [ScaleDown]][!UpdateMeterGroup BackgroundGroup][!UpdateMeterGroup WeatherGroup][!Redraw]
MouseScrollUpAction=[!SetVariable Scale [ScaleUp]][!UpdateMeterGroup BackgroundGroup][!UpdateMeterGroup WeatherGroup][!Redraw]
DynamicVariables=1
UpdateDivider=-1

[BackgroundWeather]
Meter=Shape
Shape=Rectangle 0,(104/#Scale#),(280/#Scale#),(40/#Scale#) | Fill Color 20,20,220,1 | StrokeWidth 0
Group=BackgroundGroup
LeftMouseDoubleClickAction=[!ToggleMeterGroup "WeatherGroup"]
MouseScrollDownAction=[!SetVariable Scale [ScaleDown]][!UpdateMeterGroup BackgroundGroup][!UpdateMeterGroup WeatherGroup][!Redraw]
MouseScrollUpAction=[!SetVariable Scale [ScaleUp]][!UpdateMeterGroup BackgroundGroup][!UpdateMeterGroup WeatherGroup][!Redraw]
DynamicVariables=1
UpdateDivider=-1

;==================

;--- Time
;
[MeasureTime]
Measure=Time
Format=%#I:%M %p

[MeterTime]
MeasureName=MeasureTime
Meter=STRING
Group=TimeGroup
X=2
Y=(2/#Scale#)r
MeterStyle=DisplayStyle1
FontColor=#White#
FontSize=(40/#Scale#)
InlineSetting=Size | (12/#Scale#)
InlinePattern=( )
AntiAlias=1
DynamicVariables=1
Hidden = #TimeHidden#

[MeterTimeMarker]
Meter=String
Group=TimeGroup
X=2
Y=(46/#Scale#)r
DynamicVariables=1
Hidden = #TimeHidden#

;--- Date
;
[MeasureDate]
Measure=Time
Format=%d

[MeasureMonth]
Measure=Time
Format=%B

[MeasureDay]
Measure=Time
Format=%A
[MeterDate]
MeasureName=MeasureDate
Meter=STRING
Group=DateGroup
X=2
Y=(2/#Scale#)r
MeterStyle=DisplayStyle1
FontColor=#White#
FontSize=(36/#Scale#)
AntiAlias=1
DynamicVariables=1
Hidden = #DateHidden#

[MeterMonth]
MeasureName=MeasureMonth
Meter=STRING
Group=DateGroup
X=(73/#Scale#)r
Y=(8/#Scale#)r
MeterStyle=DisplayStyle1
FontColor=255,80,120,200
FontSize=(18/#Scale#)
InlineSetting=Case | Upper
AntiAlias=1
DynamicVariables=1
Hidden = #DateHidden#

;monday, etc
[MeterDay]
MeasureName=MeasureDay
Meter=STRING
Group=DateGroup
X=r
Y=(-11/#Scale#)R
MeterStyle=DisplayStyle1
FontColor=#White#
FontSize=(15/#Scale#)
InlineSetting=Case | Upper
AntiAlias=1
DynamicVariables=1
Hidden = #DateHidden#

[MeterDateMarker]
Meter=String
Group=DateGroup
X=2
Y=(16/#Scale#)r
DynamicVariables=1
Hidden = #DateHidden#

;--- Weather
;
[GetWeather]
Measure=Plugin
Plugin=WebParser
UpdateRate=#UpdateWeatherSeconds#
Url=http://www.freeweather.com/cgi-bin/weather/weather.cgi?pands=02346&daysonly=0&maxdays=1
RegExp=(?siU)>Currently:</td>.*> (.*)</td>.*>Temp:</td>.*> (.*)</td>.*>Humidity:</td>.*> (.*)</td>.*</table>
FinishAction=[!UpdateMeter "MeterTemp"][!UpdateMeter "MeterDesc"][!UpdateMeter "MeterWeatherHumidity"]

;

[MeasureWeatherDesc]
Measure=Plugin
Plugin=WebParser
Url=[GetWeather]
StringIndex=1
UpdateDivider=-1

[MeasureWeatherTemp]
Measure=Plugin
Plugin=WebParser
Url=[GetWeather]
StringIndex=2
DecodeCharacterReference=1
UpdateDivider=-1

[MeasureWeatherHumidity]
Measure=Plugin
Plugin=WebParser
Url=[GetWeather]
StringIndex=3
UpdateDivider=-1

;

[MeterTemp]
MeasureName=MeasureWeatherTemp
Meter=STRING
Group=WeatherGroup
X=2
Y=(2/#Scale#)r
MeterStyle=DisplayStyle1
FontSize=(30/#Scale#)
InlineSetting=Size | (16/#Scale#)
InlinePattern=F
Antialias=1
DynamicVariables=1
Hidden=#WeatherHidden#
UpdateDivider=-1

[MeterDesc]
MeasureName=MeasureWeatherDesc
Meter=STRING
Group=WeatherGroup
X=(100/#Scale#)
Y=(8/#Scale#)r
MeterStyle=DisplayStyle1
FontSize=(14/#Scale#)
InlineSetting=Case | Upper
Antialias=1
DynamicVariables=1
Hidden=#WeatherHidden#
UpdateDivider=-1

[MeterWeatherHumidity]
MeasureName=MeasureWeatherHumidity
Meter=STRING
Group=WeatherGroup
X=r
Y=(20/#Scale#)r
MeterStyle=DisplayStyle1
FontSize=(10/#Scale#)
Antialias=1
Text=Humidity: %1
DynamicVariables=1
Hidden=#WeatherHidden#
UpdateDivider=-1

[hr][/hr][hr][/hr]
"If you are the smartest one in the room, you are in the wrong room."
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Degree symbol getting translated

Post by balala »

Just add a DynamicVariables=1 option to both the [ScaleDown] and [ScaleUp] measures. They both are using the Scale variable, set up dynamically with mouse scroll, so they need this option.
User avatar
Codger
Posts: 97
Joined: May 29th, 2017, 3:16 pm

Re: Degree symbol getting translated

Post by Codger »

balala wrote:Just add a DynamicVariables=1 option to both the [ScaleDown] and [ScaleUp] measures. They both are using the Scale variable, set up dynamically with mouse scroll, so they need this option.
I've no doubt this will work (can't get to that machine at the moment) but I was under the belief that Calc measures didn't need DynamicVariables set.

Later: A more careful reading of the manual's line "The use of measure values in the Formula option of a Calc measure does not require the use of Dynamic Variables. " shows me my misunderstanding.
Last edited by Codger on June 26th, 2017, 4:22 pm, edited 1 time in total.
[hr][/hr][hr][/hr]
"If you are the smartest one in the room, you are in the wrong room."
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Degree symbol getting translated

Post by jsmorley »

Codger wrote:I've no doubt this will work (can't get to that machine at the moment) but I was under the belief that Calc measures didn't need DynamicVariables set.
They don't to use the value of a measure in the Formula option, but DO if you are using a [SectionVariable] rather than the direct numeric value of a measure.

https://docs.rainmeter.net/manual/variables/section-variables/

[MeasureValue]
Measure=Calc
Formula=10
Substitute="10":"95"

[MeasureCalc]
Measure=Calc
Formula=MeasureValue + 5
(This will return 15)

[MeasureCalc2]
Measure=Calc
Formula=[MeasureValue] + 5
DynamicVariables=1
(This will return 100)
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Degree symbol getting translated

Post by balala »

Codger wrote:I've no doubt this will work (can't get to that machine at the moment) but I was under the belief that Calc measures didn't need DynamicVariables set.
In addition to jsmorley's reply, I say that they do, if are using variables set up dynamically, with the !SetVariable bang. The help page of the Calc measure says:
Section Variables, Variables and Built-in Variables follow the normal rules.
which means that in such cases you also have to set up the dynamic variables, with the DynamicVariables=1 option.