Domino Code Fragment

Code Name*
Select Case with Enum values
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.3.133.131.168
Description*
You can get this to work by treating the Enums as strings. In particular, see the modified script below.
Type*
LotusScript
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
Sub Main
Stat = CalcMode (1440)
End Sub

Function CalcMode(x)
Dim ScaleMode As String
ScaleMode = .ApplicationWindow.UserInterfacePrefs.SizingUnits
Print "Scale Mode " ScaleMode
ScaleString = .ApplicationWindow.UserInterfacePrefs.SizingUnitName
Select Case ScaleMode
Case "$LtsScaleModeCentimeter"
AdjustFactor = 567

Case "$LtsScaleModeInch"
AdjustFactor = 1440

Case "$LwpScaleModePica"
AdjustFactor = 240

Case "$LtsScaleModePoint"
Messagebox "Point"
AdjustFactor = 20

End Select
'AdjustValue = x/AdjustFactor
'RetString = AdjustValue & " " & ScaleString
Print RetString


End Function