Jump to content

Pass values to VB Function and get the return


Recommended Posts

Posted

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?

Posted

~Thanks borgunit

 

I spend some time on that site so I'm ahsamed that I hadn't noticed this page.

 

thanks again.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...