Johntosh Posted January 24, 2009 Posted January 24, 2009 I need to find a random number between two set numbers. I have not found a quick method of acheiving this in VL, however I have found a neat VB Function. Public Function RandomNumber(ByVal MaxValue As Long, Optional _ ByVal MinValue As Long = 0) On Error Resume Next Randomize Timer RandomNumber = Int((MaxValue - MinValue + 1) * Rnd) + MinValue End Function Is it possible to pass variables from AutoLISP to VB? Also, would I be able to get the return value back into AutoLISP? Quote
borgunit Posted January 26, 2009 Posted January 26, 2009 http://www.afralisp.net/vl/vl-vba1.htm Quote
Johntosh Posted January 27, 2009 Author Posted January 27, 2009 ~Thanks borgunit I spend some time on that site so I'm ahsamed that I hadn't noticed this page. thanks again. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.