Jump to content

Search the Community

Showing results for tags 'randomize'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • CADTutor
    • News, Announcements & FAQ
    • Feedback
  • AutoCAD
    • AutoCAD Beginners' Area
    • AutoCAD 2D Drafting, Object Properties & Interface
    • AutoCAD Drawing Management & Output
    • AutoCAD 3D Modelling & Rendering
    • AutoCAD Vertical Products
    • AutoCAD LT
    • CAD Management
    • AutoCAD Bugs, Error Messages & Quirks
    • AutoCAD General
    • AutoCAD Blogs
  • AutoCAD Customization
    • The CUI, Hatches, Linetypes, Scripts & Macros
    • AutoLISP, Visual LISP & DCL
    • .NET, ObjectARX & VBA
    • Application Beta Testing
    • Application Archive
  • Other Autodesk Products
    • Autodesk 3ds Max
    • Autodesk Revit
    • Autodesk Inventor
    • Autodesk Software General
  • Other CAD Products
    • BricsCAD
    • SketchUp
    • Rhino
    • SolidWorks
    • MicroStation
    • Design Software
    • Catch All
  • Resources
    • Tutorials & Tips'n'Tricks
    • AutoCAD Museum
    • Blocks, Images, Models & Materials
    • Useful Links
  • Community
    • Introduce Yourself
    • Showcase
    • Work In Progress
    • Jobs & Training
    • Chat
    • Competitions

Categories

  • Programs and Scripts
  • 2D AutoCAD Blocks
  • 3D AutoCAD Blocks
  • Images
    • Backgrounds

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 1 result

  1. teknomatika

    Loto numbers

    ;;;Random number generation function - based on the linear ;;; congruential method as presented in Doug Cooper's book ;;; Condensed Pascal, pp. 116-117. (defun rnd (/ modulus multiplier increment random) (if (not seed) (setq seed (getvar "DATE")) ) (setq modulus 65536 multiplier 25173 increment 13849 seed (rem (+ (* multiplier seed) increment) modulus) random (/ seed modulus) ) ) (defun c:loto(/ qn cont pt disth) (setvar "luprec" 0) (setq qn 49);;Number Range (setq cont (getint "\nQuantity of numbers.? ")) (setq pt (getpoint "\nPoint to write: ")) (setq disth 1);;Horizontal space (repeat cont (setq num (fix(* qn (rnd)))) (setq cont (+ cont 1)) (command "_.text" "_non" pt 0.20 0 (rtos num)) (setq pt (list (+ (car pt)disth)(cadr pt)(caddr pt))) ) (princ) ) For fun, this basic routine is supposed to write a certain group of random numbers within a range established or to be established. The question, for which I am still not able to solve, is to not validate the number 0 and prevent the outflow of repeated numbers together. Anyone want to help?
×
×
  • Create New...