Domino Code Fragment

Code Name*
Select Case with Enum values
Date*
06/28/2025
Source (or email address if you prefer)*
[email protected]
IP address:.172.69.58.79
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