Jump to content

Search the Community

Showing results for tags 'caliper'.

  • 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. fuccaro

    Caliper fun

    Hello people! Today I realized that AutoCAD is just waiting on my hard disc, so I started it and I wrote a short Lisp program. If someone wants to play: load the lisp and start it by typing TESTME in the command line. Probable you will have to double click with the wheel to get the zoom to the right place. You should see a caliper open at a random dimension. All you have to do is to read the caliper and enter the value. The command line should show at least 3 lines to see the result. Want to play again? Press enter. While AutoCAD waits for your input, you may use the mouse to zoom/pan. Or if you want to cheat, you can measure the opening of the caliper and enter the measured value. Have fun! (defun c:TestMe() (if (not (tblsearch "BLOCK" "SublerA")) (MakeBlockA)) (if (not (tblsearch "BLOCK" "SublerB")) (MakeBlockB)) (if (not (ssget "X" (list '(0 . "INSERT") '(2 . "SublerA")))) (entmake (list '(0 . "INSERT") '(2 . "SublerA") '(10 0 0 0)))) (if (not (ssget "X" (list '(0 . "INSERT") '(2 . "SublerB")))) (entmake (list '(0 . "INSERT") '(2 . "SublerB") '(10 0 0 0)))) (setq measured (/ (rem (getvar "millisecs") 1500) 10.0)) (setq entl (entget (entlast))) (setq entl (subst (list 10 measured 0 0) (assoc 10 entl) entl)) (entmod entl) (setq entered (getreal "Enter measured value ")) (princ (if (= measured entered) "Ok " (strcat " Not Ok! The answer is " (rtos measured) ))) (princ) ) (defun MakeBlockA() (entmake (list '(0 . "BLOCK") '(2 . "SublerA") '(10 0.0 0.0 0.0)'(70 . 0))) (setq i 0) (repeat 151 (cond ((= (* 5 (/ i 5)) i) (progn (setq m 0.5) (entmake (list '(0 . "text") (list 10 i 2.6 0) (cons 1 (itoa i)) '(40 . 1.4) (cons 50 0.7))) ) ) ) (entmake (list '(0 . "LINE") (list 10 i 0 0) (list 11 i (+ 1.5 m) 0))) (setq i (1+ i) m 0) ) (setq points (list '(-3 0 0) '(170 0 0) '(170 8 0) '(-10 8 0) '(-10 -15 0) '(-5 -25 0) '(-5 -30 0) '(-3 -30 0))) (setq p1 (list -3 -30 0)) (foreach p points (entmake (list '(0 . "LINE") (cons 10 p1) (cons 11 p))) (setq p1 p) ) (entmake (list '(0 . "ENDBLK"))) ) (defun MakeBlockB() (entmake (list '(0 . "BLOCK") (cons 2 "SublerB") (list 10 0.0 0.0 0.0)'(70 . 0))) (setq i 0) (repeat 11 (cond ((= i (* 5 (/ i 5))) (progn (setq n -0.5) (entmake (list '(0 . "text") (list 10 (- (* 0.9 i) 0.5) -5 0) (cons 1 (itoa i)) '(40 . 1.4) (cons 50 0)(cons 62 1))) ))) (entmake (list '(0 . "LINE") (list 10 (* 0.9 i) 0 0) (list 11 (* 0.9 i) (+ -2 n) 0)(cons 62 1))) (setq i (1+ i) n 0) ) (setq p1 '(-3 -30 0)) (setq points (list '(-3 0 0) '(15 0 0) '(15 -7 0) '(4 -7 0) '(4 -15 0) '(-1 -25 0) '(-1 -30 0) '(-3 -30 0))) (foreach p points (entmake (list '(0 . "LINE") (cons 10 p1) (cons 11 p))) (setq p1 p) ) (entmake (list '(0 . "ENDBLK"))) )
×
×
  • Create New...