Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/04/2024 in all areas

  1. An association list is nice for this and can easily be generated if A=1 B=2 etc. (defun c:foo (/ a myblks) (setq myblks (mapcar '(lambda (x) (list x (strcat "Block" (itoa (- (ascii (substr x (strlen x))) 64))))) '("BlockA" "BlockB" "BlockC") ) ) ;; (("BlockA" "Block1") ("BlockB" "Block2") ("BlockC" "Block3")) (foreach blk myblks (if (and (tblsearch "BLOCK" blk) (set a (assoc blk myblks))) (command "-insert" (cadr a) "0,0" "" "" "") ) ) (princ) )
    1 point
×
×
  • Create New...