Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/29/2020 in all areas

  1. This type of operation arises quite frequently - here's one way to approach it: (defun f ( l / a r ) (foreach x (reverse l) (if (setq a (assoc (car x) r)) (setq r (subst (vl-list* (car x) (cdr x) " & " (cdr a)) a r)) (setq r (cons (list (car x) (cdr x)) r)) ) ) r ) _$ (f '((1 . "a")(23 . "b")(42 . "c")(1 . "d")(23 . "e")(42 . "f")(42 . "g"))) ((1 "a" " & " "d") (23 "b" " & " "e") (42 "c" " & " "f" " & " "g"))
    1 point
  2. Simple defun to change units etc. Why would you just not have two dwt with them set to mm and M so no need for the acaddoc.lsp to change. (defun civ_units () (SETQ ANGBASEE (GETVAR "ANGBASE")) (SETQ ANGDIRR (GETVAR "ANGDIR")) (SETQ LUNITSS (GETVAR "LUNITS")) (SETQ LUPRECC (GETVAR "LUPREC")) (SETQ AUNITSS (GETVAR "AUNITS")) (SETQ AUPRECC (GETVAR "AUPREC")) (SETVAR "LUNITS" 2) (SETVAR "ANGBASE" 0.0) (SETVAR "ANGDIR" 0) (SETVAR "LUPREC" 0) (SETVAR "AUNITS" 0) (SETVAR "AUPREC" 0) ) (defun old_civ_units () (SETVAR "LUNITS" lunitss) (SETVAR "ANGBASE" angbasee) (SETVAR "ANGDIR" angdirr) (SETVAR "LUPREC" luprecc) (SETVAR "AUNITS" aunitss) (SETVAR "AUPREC" auprecc) )
    1 point
×
×
  • Create New...