Author Topic: basic AutoLisp-compare adjacent list elements and return a list  (Read 1225 times)

0 Members and 1 Guest are viewing this topic.

d2010

  • Bull Frog
  • Posts: 323
basic AutoLisp-compare adjacent list elements and return a list
« 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
« Last Edit: October 26, 2021, 03:58:08 AM by d2010 »

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: basic AutoLisp-compare adjacent list elements and return a list
« Reply #1 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?


d2010

  • Bull Frog
  • Posts: 323
Re: basic AutoLisp-compare adjacent list elements and return a list
« Reply #3 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.  
« Last Edit: February 01, 2022, 09:24:49 AM by d2010 »