So I know how to get the date from autocad using CDATE. And I know how to parse that info to get 12/23/14. But how can I, for example, get the 12 to be "DEC". Do I need to make a multiple if statement for that part of the string?
(defun mth ( m / i l);hanhphuc 24/12/2014(setq i 13 )(eval (cons 'cond (mapcar '(lambda (a b /) (list (eval (cons '= (list m 'a))) b)) (repeat 12 (setq l (cons (setq i (1- i)) l))) '("JAN" "FEB" "MAR" "APR" "MAY" "JUN" "JUL" "AUG" "SEPT" "OCT" "NOV" "DEC") ) ;_ end of mapcar ) ;_ end of cons ) ;_ end of eval)
functional call:
(mth 12) ; returns "DEC"
since you know coding, so the rest try it yourself using string function
strcat , substr , vl-string-search
etc..
p/s: i'm ibanez fan merry X'mas donate to CADtutor