Is there a function to generate random numbers?

Discussion in 'AutoCAD' started by yuvaraj80, May 16, 2004.

  1. yuvaraj80

    yuvaraj80 Guest

    Hi,
    I am one of the fond users of AutoCAD and Visual Lisp. I am developing an animation software in AutoCAD using Vlisp, for which a function that could generate random numbers or that could return a random number would be handy.

    Currently I manage by running an external C-application to generate a list of ran. nos. and save as a text file. The operation by this way is not smooth. So, if anyone knows any other way of generating a random number thru Vlisp would be helpful to me.

    thanks,
    Yuvaraj.

    S/W Programmer,
    Tata Consultancy Services (TCS),
    India.
     
    yuvaraj80, May 16, 2004
    #1
  2. You could ...

    .... use Kenny Ramage's code: http://www.afralisp.com/tips2.htm

    .... use DOSLIB: http://www.mcneel.com/cgi-bin/download.cgi?doslib.

    .... use a vba call (randomize and rnd).

    .... write and compile your own activex dll with related functionality.

    .... use c++/objectarx for the app itself and then use srand from the stdlib.

    .... exploit other internet resources http://tinyurl.com/2znyh

    ....

    <imho>None of my business, but "animation software" using lisp? At face
    value I'd consider another development platform better suited (perhaps
    c++) lest you continually encounter language roadblocks</imho>

    a function that could generate random numbers or that could return a random number would be handy.
    by this way is not smooth. So, if anyone knows any other way of generating a random number thru Vlisp would be helpful to me.
     
    michael puckett, May 16, 2004
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.