10 mm steps

10 mm steps

martinhoos
Advocate Advocate
294 Views
2 Replies
Message 1 of 3

10 mm steps

martinhoos
Advocate
Advocate

Hello all,

i have a user parameter called "length", this parameter shouldt only works in 10 mm steps. if not a message appears. Is there anybody who can help me with this Problem?

Thanks in advance

Regards

Martin

 

0 Likes
Accepted solutions (1)
295 Views
2 Replies
Replies (2)
Message 2 of 3

Owner2229
Advisor
Advisor
Accepted solution

Here you go:

Paste this to a new rule and test it out by changing the parameter:

 

s = length
Dim oVal As Double = Parameter("length")
If (oVal Mod 10) = 0 Then Exit Sub
MsgBox("Parameter 'length' must be a multiple of 10." & vblf & "Current value: " & oVal )
Consider using "Accept as Solution" / "Kudos" if you find this helpful.
- - - - - - - - - - - - - - -
Regards,
Mike

"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - John F. Woods
0 Likes
Message 3 of 3

martinhoos
Advocate
Advocate

Thank you very much, Mike! It runs....  🙂

0 Likes