Hello, AutoCAD community,
The AutoCAD team wants to hear your impressions of AutoLISP, specifically around its availability in the 2024 release of AutoCAD LT.
Which routines are you most excited to use? Let us know in the comments below!

Jonathan Hand
Industry Community Manager | AEC (Architecture & Building)
Other then the previous result under AutoCAD full version I showed you, I now get a nil result under AutoCAD LT. So it's not solved yet. Maybe AutoCAD LT does not swallow certain VLAX functions? The problem now is that under AutoCAD LT I do not have VLIDE to check where it goes wrong.
You can always copy and paste the code a line at a time to LT command line and troubleshoot the old fashion way
This function not supported in LT. It’s time for you to go full Autocad
https://help.autodesk.com/view/ACDLT/2024/ENU/?guid=GUID-D5A6811A-F110-49DD-AF83-1F64773D7DC1
We already have 12 full versions. I was hoping to make (all) my code work under LT so that we can switch to the LT versions in the future . LT is 0,25% the price of a full version.
No can do unfortunately
Look at Bricscad the basic version has lisp, I ahve the next Version Pro, so can not comment about what does not work. You can download a trial version.
This can be used as dos_splitpath:
(defun dos_splitpath (path / spl ad)
(setq path (vl-string-trim " " path))
(if (or (= (substr path (strlen path)) "/")(= (substr path (strlen path)) "\\"))(setq path (strcat path "a.a") ad T))
(setq spl (fnsplitl (strcase path))) ; ("C:\\ACAD\\SubD\\" "abc" ".txt")
(if (= (substr path 2 1) ":")
(setq spl (cons (substr (car spl) 1 2) (cons (substr (car spl) 3) (cdr spl))))
(setq spl (cons "" (cons (substr (car spl) 3) (cdr spl))))
)
(if ad (setq spl (list (car spl)(cadr spl) "" "")))
spl
)
Vladimir Michl, www.arkance-systems.cz - www.cadforum.cz
I want to orderly disable commands in I havn't fixed yet for LT.
Acadver in AutoCAD LT and Full version both result in "24.3s (LMS Tech)".
How can I determin the AutoCAD LT version in lisp?
I am using:
(defun isinLT ( / )(= (strcase (getvar "PROGRAM") T) "acadlt"))
(getvar "VERSION")
Vladimir Michl, www.arkance-systems.cz - www.cadforum.cz
I would have expected Acadver to give a different result. But this works. Simple, thanks. : )
Do you perhaps also have one to replace dos_cdate?
(dos_cdate "%y%m%d %H.%Mu") Results in "240312 13.15u"
I can use: (jtoc (getvar "date")) which results in (2024 3 12 13 19 21.0)
But then I need to convert that to the result of dos_cdate.
To get the same result as (dos_cdate "%y%m%d %H.%Mu")
I created:
(defun dos-cdate ( / ttt tt1 )
(setq ttt (jtoc (getvar "date")))
(strcat (substr (rtos (car ttt)) 3 2)
(if (= (strlen (setq tt1 (rtos (nth 1 ttt)))) 1) (strcat "0" tt1) tt1)
(if (= (strlen (setq tt1 (rtos (nth 2 ttt)))) 1) (strcat "0" tt1) tt1) " "
(if (= (strlen (setq tt1 (rtos (nth 3 ttt)))) 1) (strcat "0" tt1) tt1) "."
(if (= (strlen (setq tt1 (rtos (nth 4 ttt)))) 1) (strcat "0" tt1) tt1) "u"
)
)
But I also need to replace:
(dos_cdate "%W")
(dos_cdate "%Y%m%d")
(dos_cdate "%y%m%d%H%m%S")
(dos_cdate "%d-%m-%y / %H.%Mu")
(dos_cdate "%d%m%y %H.%Mu \(week ")
(dos_cdate "%d-%m-%Y %H.%Mu \(week %W\)")
If you don't need exactly same formatting codes, you can use e.g.
(menucmd "M=$(edtime,$(getvar,date),YY MO DD HH:MM)")
(menucmd "M=$(edtime,$(getvar,date),YY-MO-DD H:MM:ss \",\" DDDD)")
All date calculations will be more complicated.
Vladimír Michl, www.arkance-systems.cz - www.cadforum.cz
Thanks! This is better. I would not expect this to be possible with menucmd.
Do you also know how to obtain the week number? It doesn't seem to be possible with menucmd.
Did you google ? Why week number any way if you have a date I am sure somewhere there is a formula.
Need to take into account Feb 28 or 29. Make a list of number of days per month (31 29 31 ......
No, this is not possible with edtime. This would require those separate calculations - not complicated ones, but not to be just expressed as a formatting code. See e.g. the Lee Mac's code for the weekday and weeknumber:
https://www.cadforum.cz/en/how-to-get-week-day-and-week-number-from-a-given-date-tip14063
Vladimir Michl, www.arkance-systems.cz - www.cadforum.cz
Thanks! Replaced dos_cdate.
I did eventually find the getweek function but LM:weeknumber is much shorter. Better?
; (getweek (atoi (menucmd "M=$(edtime,$(getvar,date),YYYYMODD)")))
(defun getweek (dt / date year month day hour minute year# month# m DayNumber Weekday Jan1Weekday weeknr)
(defun LeapYear (Y) (if (or (and (= (rem Y 4) 0)(/= (rem Y 100) 0))(= (rem Y 400) 0)) T nil))
(setq date (rtos dt 2 4) year (substr date 1 4) month (substr date 5 2) day (substr date 7 2) hour (substr date 10 2) minute (substr date 12 2) year# (atoi year) month# (atoi month) M (1- month#) DayNumber (atoi day))
(if (= (setq Weekday (jtow (ctoj year# month# DayNumber 0 0 0))) 0)(setq Weekday 7))
(setq Weekday$ (nth (1- Weekday) '("Maandag" "Dinsdag" "Woensdag" "Donderdag" "Vrijdag" "Zaterdag" "Zondag")))
(if (= (setq Jan1Weekday (jtow (ctoj year# 1 1 0 0 0))) 0)(setq Jan1Weekday 7))
(while (> M 0) (setq DayNumber (+ DayNumber (cond ((member M '(4 6 9 11)) 30) ((= M 2)(if (LeapYear year#) 29 28)) (T 31))) M (1- M)))
(cond ((and (<= DayNumber (- 8 Jan1Weekday))(> Jan1Weekday 4)) (setq year$ (strcat " "(itoa (1- year#)))) (if (or (= Jan1Weekday 5)(and (= Jan1Weekday 6)(LeapYear (1- Year#)))) (setq weeknr 53) (setq weeknr 52)))
((< (- (if (LeapYear year#) 366 365) DayNumber)(- 4 Weekday)) (setq year$ (strcat " "(itoa (1+ year#))) weeknr 1))
(T (setq year$ "") (setq weeknr (fix (/ (+ DayNumber (- 7 Weekday)(1- Jan1Weekday)) 7.0))) (if (> Jan1Weekday 4)(setq weeknr (1- weeknr))))
) ; (strcat year "-" month "-" day " " hour ":" minute "u (Week "(itoa weeknr) year$ ") " Weekday$)
(strcat (itoa weeknr) year$)
)
Can't find what you're looking for? Ask the community or share your knowledge.