TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: d2010 on October 25, 2021, 12:46:08 PM

Title: basic AutoLisp-compare adjacent list elements and return a list
Post by: d2010 on October 25, 2021, 12:46:08 PM
Write Lisp functions to compare adjacent list elements and return a list, as described in each
case. You should not use any built in Lisp functions beyond what we covered in class. The
Title: Re: basic AutoLisp-compare adjacent list elements and return a list
Post by: Lee Mac on October 25, 2021, 03:17:22 PM
Write Lisp functions to compare adjacent list elements and return a list, as described in each
case. You should not use any built in Lisp functions beyond what we covered in class.

Is this a homework assignment?
Title: Re: basic AutoLisp-compare adjacent list elements and return a list
Post by: VovKa on October 25, 2021, 04:17:08 PM
Is this a homework assignment?
almost :)
https://www.chegg.com/homework-help/questions-and-answers/2-write-lisp-functions-compare-adjacent-list-elements-return-list-described-case-use-built-q86376081
Title: Re: basic AutoLisp-compare adjacent list elements and return a list
Post by: d2010 on October 26, 2021, 03:57:53 AM
Thank you**,
I finished all Tasks,
Code - Auto/Visual Lisp: [Select]
  1. (Defun ronjonp_boxsel(vlmsg / $rr fns enb zeo bnam lmybox dyn ndda lmybox fns)
  2.  (setq;|You see original-source, keep for youself|;
  3.          $rr nil
  4.          vlmsg (if (=  vlmsg nil) "\nYou select one(1)SprBlock inside.dwg:" vlmsg)) (vl_load_com) (prompt vlmsg) (setq;|a69263580|;
  5.          fns (ssget (list (cons 0 "INSERT")))) (if (=  fns nil) (progn  (alert "error* EmptySelection\nThis solution multiple blocks in all-pages.") (exit))) (setq;|a69264676|;
  6.          enb (ssname fns 0)) (setq;|a69265224|;
  7.          zeo (list 0.0 0.0 0.0)) (setq;|a69265772|;
  8.          bnam (vla-get-effectivename (vlax-ename->vla-object enb)))
  9. (list bnam $rr))
  10.  
  11. (Defun ronjonp_boxsel(vlmsg / $rr fns enb zeo bnam lmybox dyn ndda lmybox fns)
  12.  (setq;|You see Half-Encrypted-ascii.txt|;
  13.          $rr nil
  14.          vlmsg (if (=  vlmsg nil) "\nYou select one(1)SprBlock inside.dwg:" vlmsg)) (jc_lda18 "898A" (list)) (prompt vlmsg) (setq;|a60612828|;
  15.          fns (jc_lda18 "D0B1" (list (list (cons 0 "INSERT"))))) (if (=  fns nil) (progn  (jc_lda18 "6E00" (list "error* EmptySelection\nThis solution multiple blocks in all-pages.")) (exit))) (setq;|a60613924|;
  16.          enb (jc_lda18 "48F2" (list fns 0))) (setq;|a60614472|;
  17.          zeo (list 0.0 0.0 0.0)) (setq;|a60615020|;
  18.          bnam (jc_lda18 "0BF6" (list (vlax-ename->vla-object enb))))
  19. (list bnam $rr))
  20.