Jump to content

Search the Community

Showing results for tags 'while function'.

  • 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 3 results

  1. hi frids, if there is any other way to do this program in simply..please help me plpl.csv
  2. Hi all, I'm stuck inside the while loop and can't come out of it. Can someone help me on this (if possible please provide information on why its not closing). This is just a small function of a much larger lisp that I'm playing with and Esc to exit means complete program termination. Here is how I inteded it to be used for. Once user decides to use drawshapes, and if the answer is one of the keyword (eg. Rectangle) then user should be able draw as many rectangles he likes and if Enter is hit it should come back to main menu again ask for keyword to choose (circle or ellipse). Thanks in advance. (defun drawshapes (/ dtype) (setvar "cmdecho" 1) (setq dtype T) (while dtype (initget (+ 2 4) "R P C E") (prompt "\n*** Enter option R, P, C, E ***") (setq dtype (getkword "\nselect your option: Rectangle, Pline, Circle, Ellipse or hit Enter to close:")) (if dtype (cond ( (= dtype "R") (setq loop T) (while loop (command "_.rectang") (while (= 1 (logand 1 (getvar 'CMDACTIVE)))(command pause)) ); end while ) ( (= dtype "P") (setq loop T) (while loop (command "_.PLINE") (while (= 1 (logand 1 (getvar 'CMDACTIVE)))(command pause)) ); end while ) ( (= dtype "C") (setq loop T) (while loop (command "_.circle") (while (= 1 (logand 1 (getvar 'CMDACTIVE)))(command pause)) ); end while ) ( (= dtype "E") (setq loop T) (while loop (command "Ellipse") (while (= 1 (logand 1 (getvar 'CMDACTIVE)))(command pause)) ); end while ) ); end cond ); end if ); end while (setvar "cmdecho" 0) );end defun
  3. Just experimenting with the 'while' function and looking for feedback as to the quality of my coding. (defun c:test (/) (setq count 0) (setq 5dig (getint "\nEnter a 5 digit number: ")) ;_Enter a 5 digit number. (while (/= count 5) (setq 5dig (getint "\nTry again, please enter a 5 digit number: ")) (setq strcount (itoa 5dig)) ;_Set a variable "strcount" to string from the interger from the variable "5dig" (setq count (strlen strcount) ;_Count the length of characters in the variable "strcount" ) ) (princ "\nYour are the Winner!") (princ) ) Thanks
×
×
  • Create New...