Results 1 to 3 of 3

Thread: ; error: bad function: (5136.4 1645.08 0.0)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Woo! Hoo! my 1st post
    Join Date
    2021-10
    Posts
    1
    Login to Give a bone
    0

    Default ; error: bad function: (5136.4 1645.08 0.0)

    hi there
    i have a problem while typing nt command autocad draw last points ...
    Code:
    (defun cdrs (key lst / pair rtn)
      (while (setq pair (assoc key lst))
        (setq rtn (cons (cdr pair) rtn)
    	  lst (cdr (member pair lst))
        )
      )
      (reverse rtn)
    )
    ;;;***********************************************************************************
    (defun c:pp ()
      (setq r (getdist "\nSpecify radius of circles: "))
      (setq s (entsel "\nSelect Polyline: "))
      (setq point (cdrs 10 (entget (car s))))
      (setq polen (length point))
      (foreach x point (command "point" x))
      (foreach x point (command "circle" x r))
    					;(setq polenst (itoa polen))
    
      ;;(alert (strcat "number of points is: " polenst))
      ;;(princ)
    )
    (defun c:nt ()
        (setq ss (ssget))
      (setq sn (entget (ssname ss 0)))
      (setq nameobj (cdr (assoc 0 sn)))
      (if (= nameobj "LWPOLYLINE")
        ((setq point (cdrs 10 (entget (car ss))))
          (setq polen (length point))
          (foreach x point (command "point" x))
        )
        ((setq start (cdr (assoc 10 sn))
    	   end	 (cdr (assoc 11 sn))
         )
         (setq plist (list start end))
         (foreach x plist (command "point" x))
        )
      )
      (princ nameobj)
      (princ)
    )
    Last edited by BlackBox; 2021-10-08 at 11:23 AM. Reason: Please use [CODE] Tags

Similar Threads

  1. Replies: 8
    Last Post: 2012-01-28, 10:01 PM
  2. error: bad function: 180
    By DijitalB in forum AutoLISP
    Replies: 7
    Last Post: 2012-01-23, 02:33 PM
  3. LISP routine returning bad function error
    By playerdraft in forum AutoLISP
    Replies: 2
    Last Post: 2011-06-15, 04:38 PM
  4. Bad function "1" error message
    By fletch97 in forum AutoLISP
    Replies: 1
    Last Post: 2007-04-06, 12:22 AM

Posting Permissions

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