Simulate

Discussion in 'AutoCAD' started by MiD-AwE, Mar 29, 2005.

  1. MiD-AwE

    MiD-AwE Guest

    Hey all,

    I'm trying to simulate the "Tip of the day" with LISP. I know that some how I'm going to need to pseudo-randomly select a var with the tips in them then display those tips, possibly as alerts, but I only want to display one tip instead of the entire list and only once each day.

    I started by adding a function to the bottom of my ACAD.LSP file. but I'm lost at choosing a tip to display. I can easily display the tip but I'm just not sure how to choose on at "random" and then sending it to the (alert TIP).

    Any help is greatly appreciated.
     
    MiD-AwE, Mar 29, 2005
    #1
  2. MiD-AwE

    gmcarter Guest

    Being pretty much self-taught, the only way I've ever been able to generate a "random" number is by using the last few digits of the result you get when you use (getvar "DATE") in the routine. Use substr to get the last few digits you need and go at it. It changes about a thousand times a second so it's just simulating random, but that's technically all a computer can do anyway. Good luck.
     
    gmcarter, Mar 29, 2005
    #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.