See the top rated post in this thread. Click here

Results 1 to 9 of 9

Thread: Was it a LISP or not a LISP

  1. #1
    Member
    Join Date
    2014-01
    Location
    Winter Park, FL.
    Posts
    8
    Login to Give a bone
    0

    Question Was it a LISP or not a LISP

    I'm not sure if this is a lisp or not. Please let me know and move if it needs to be.

    Years ago I witnessed a person working on autocad and he was placing numbers within a circle just by clicking the mouse. The number size varied to paper scale size. Was what I witnessed a lisp?

    If it was a lisp, I have a few questions.

    If it was not a lisp, what could it be?

    I don't understand lisp, but I would like to understand lisp!

    Thank you
    Justin

  2. #2
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    0

    Default Re: Was it a LISP or not a LISP

    Tcircle Express Tool command will draw the circles around the Text, but you're probably looking for "Incremental Numbering Suite" By Lee Mac:
    http://www.lee-mac.com/numinc.html
    The border may be Circular, Rectangular, Slot or an n-sided Polygon.

  3. #3
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    1

    Default Re: Was it a LISP or not a LISP

    Quote Originally Posted by Tom Beauford View Post
    ... The border may be Circular, Rectangular, Slot or an n-sided Polygon.
    ... Or an Attributed Block.
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  4. #4
    Member
    Join Date
    2014-01
    Location
    Winter Park, FL.
    Posts
    8
    Login to Give a bone
    0

    Default Re: Was it a LISP or not a LISP

    Wow!

    Looks like I have homework this weekend. Thank you very much!

    Thank you
    Justin

  5. #5
    AUGI Addict
    Join Date
    2015-12
    Posts
    2,095
    Login to Give a bone
    0

    Default Re: Was it a LISP or not a LISP

    Given the " number size varied to paper scale size" part this might have been an annotative scaled block as well.

  6. #6
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    560
    Login to Give a bone
    0

    Default Re: Was it a LISP or not a LISP

    here is an example

    Code:
    ; bubble pt num
    ; BY ALAN H AUG 2014
    
    (defun make_circle ()
      (entmake (list (cons 0 "CIRCLE")
    	 (cons 8 "0")
    	 (cons 10 (list 0 0 0))
    	 (cons 40 3.25)		; rad
    	 (cons 210 (list 0 0 1))
    	 (cons 62 256)
    	 (cons 39 0)
    	 (cons 6 "BYLAYER")
       )
      )
    )					; DEFUN
    
    (defun make_sq ()
      (setq	vertexList
      (list
      (list -3.25 -3.25 0.)
      (list 3.25 -3.25 0.)
      (list 3.25 3.25 0.)
      (list -3.25 3.25 0.)
      ))
      (entmake
        (append 
        (list '(0 . "LWPOLYLINE")
        '(100 . "AcDbEntity")
        '(100 . "AcDbPolyline")
        (cons 90 (length vertexList))
        (cons 70 1)			; 1 closed : 0 open
        (cons 8 "0")
        (cons 38 0.0)
        (cons 210 (list 0.0 0.0 1.0))
        )
        (mapcar '(lambda (pt) (cons 10 pt)) vertexList)
        )
      )
    )					; defun
    
    (defun Make_bubble ( )
    
      (entmake (list (cons 0 "BLOCK")
        (cons 2 Blkname)
        (cons 70 2)
        (cons 10 (list 0 0 0))
        (CONS 8 "0")
      ))
    
      (if (= resp "C")
      (make_circle)
      (make_sq)
      )
    
      (entmake (list (cons 0 "ATTDEF")
           (cons 8 "0")
           (cons 10 (list 0 0 0))
           (cons 1 "1")		; default value
           (cons 2 blkname)		; nblock name
           (cons 3 "Ptnum")		; tag name
           (cons 6 "BYLAYER")
           (cons 7 "STANDARD")	;text style
           (cons 8 "0")		; layer
           (cons 11 (list 0.0 0.0 0.0)) ; text insert pt
           (cons 39 0)
           (cons 40 3.5)		; text height
           (cons 41 1)		; X scale
           (cons 50 0)		; Text rotation
           (cons 51 0)		; Oblique angle
           (cons 62 256)		; by layer color 
           (cons 70 0)
           (cons 71 0)		;Text gen flag
           (cons 72 1)		; Text Justify hor 1 center
           (cons 73 0)		; field length
           (cons 74 2)		; Text Justify ver 2 center
           (cons 210 (list 0 0 1))
      ))
    
      (entmake (list (cons 0 "ENDBLK")))
      (princ)
     
    )
    
    (defun C:bub (/ ptnum ptnumb pt pt2 oldsnap chrnum sc curspace)
      (if (= 1 (getvar 'cvport))
      (setq sc 1.0)
      (setq sc (* 3.5 (/ (getreal "\nEnter plotting scale") 1000.0 )))
      )
    
      (setq oldsnap (getvar "osmode"))
      (setvar "textstyle" "standard")
    
      (setq ptnum (getstring "\nEnter Pt Number or alpha"))
      (setq chrnum (ascii (substr ptnum 1 1))) ; 1st character is number
      (if (< chrnum 58)
      (setq ptnumb (atof ptnum))		;convert back to a number 
      )
    
    (ALERT "Pick end of line Enter to exit")
    
      (while (setq pt (getpoint "\Pick end of line Enter to exit"))
        (setq pt2 (polar pt (/ pi 2.0) 3.25))
        (setvar "osmode" 0)
    
        (if	(< chrnum 58)
          (progn
    	(command "-insert"
    		 blkname
    		 pt
    		 sc
    		 ""
    		 0
    		 (rtos ptnumb 2 0)
    	)
    	(setq ptnumb (+ ptnumb 1))
          )
          (progn
    	(command "-insert"
    		 blkname
    		 pt
    		 sc
    		 ""
    		 0
    		 (chr chrnum)
    	)
    	(setq chrnum (+ chrnum 1))
          )
        )
        (command "move" "L" "" pt pt2)
        (setvar "osmode" 1)
      )
    
      (setvar "osmode" oldsnap)
      (princ)
    )					; end defun
    
    ;;;;;; 
    ; program starts here checking 
    
    (alert "Type Bub to repeat\nYou can do alpha's or numbers\nSquare or circles")
    (initget 6 "S s C c")
    (setq resp (strcase
    	     (Getkword "\nDo you want Circle or Square C or S <C> ")
    	   )
    )
    (if (or (= resp "C") (= resp nil))
      (setq blkname "SETOUT_POINT_NO")
      (setq blkname "SETOUT_POINT_NOSQ")
    )
    
    (setq att (getvar 'attdia))
    (setvar 'attdia 0)
    (if (/= (tblsearch "BLOCK" blkname) NIL)
    (PRINC "FOUND")				; block exists
    (Make_bubble)
    )
    
    (C:BUB)
    (setvar 'attdia att)
    (princ)

  7. #7
    Certifiable AUGI Addict
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: Was it a LISP or not a LISP

    Quote Originally Posted by JustininFL View Post
    I'm not sure if this is a lisp or not. Please let me know and move if it needs to be.

    Years ago I witnessed a person working on autocad and he was placing numbers within a circle just by clicking the mouse. The number size varied to paper scale size. Was what I witnessed a lisp?
    LISP is a programming language. Inside AutoCAD there's a variant of LISP called AutoLisp. This works as an interpreted scripting language (much like JavaScript works inside of web pages). You get other Lisps as well (though not of much use inside of ACad), LISP was originally one of the very first programming languages, in fact it's the 2nd high-level language just after Fortran (originally made in 1958 ). Since then many different implementations were created, AutoLisp derived from one called XLisp which was made in the mid 70s. Others (both older and more recent) include: Common Lisp / Scheme / Clojure / Racket / Julia / etc.

    That example may very well be an AutoLisp tool someone wrote (i.e. like Lee Mac's Increment Suite, or the AutoIncr tool in one of my old tools: Caddons ). It may equally be written in something else, e.g. as an ObjectARX extension written in C++, or a DotNet assembly written in C#, or some older stuff as VBA macros. It's just that in ACad it's generally easier to start such a thing in AutoLisp (not as much preliminary work and learning to do as you'd need when making your tools in C++/C#).
    Last edited by irneb; 2016-09-13 at 02:36 PM.

  8. #8
    Member
    Join Date
    2014-01
    Location
    Winter Park, FL.
    Posts
    8
    Login to Give a bone
    0

    Default Re: Was it a LISP or not a LISP

    Quote Originally Posted by JustininFL View Post
    Wow!

    Looks like I have homework this weekend. Thank you very much!

    Thank you
    Justin
    Well, after that weekend I was overwhelmed with AutoLISP. But, I continued with it and ordered a few books and kept with it (Slow process). I am determined to understand AutoLISP

  9. #9
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: Was it a LISP or not a LISP

    Best LISP book I've ever read -

    https://www.theswamp.org/index.php?topic=39403.0
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

Similar Threads

  1. Replies: 13
    Last Post: 2014-01-20, 06:14 PM
  2. Replies: 3
    Last Post: 2012-05-07, 08:16 PM
  3. Replies: 9
    Last Post: 2012-01-21, 07:58 AM
  4. LISP Debug Broken - Need Lisp to VBA Convert Help
    By bsardeson in forum VBA/COM Interop
    Replies: 4
    Last Post: 2010-10-06, 05:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •