Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

🔊 - Whats your thoughts on AutoLISP in AutoCAD LT 2024?

146 REPLIES 146
Reply
Message 1 of 147
handjonathan
18591 Views, 146 Replies

🔊 - Whats your thoughts on AutoLISP in AutoCAD LT 2024?

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)

146 REPLIES 146
Message 61 of 147
HE-MJJ
in reply to: handjonathan

I have created replacements for the dos_msgbox and dos_msgboxex functions.

There are more doslib functions I use that need to be replaced like:

 

dos_cdate

dos_filedate

dos_mkdir

dos_dir

dos_subdir

dos_splitpath

dos_delete

dos_execute

dos_beep

dos_printers

dis_setprn

dos_attrib

dos_getfilem

dos_openp

dos_shellexe

dos_filep

dos_copy

dos_serialno

dos_computer

dos_dirp

dos_drivetype

dos_getprogress

dos_splash

dos_exewait

dos_filesize

dos_rendir

dos_rename

 

I have to look more into this but, are there replacements available for all these?

I assume dos_dir can be replaced by (vl-directory-files)

Message 62 of 147
Sea-Haven
in reply to: handjonathan

Start with say the VLA equivalent, yes some have an alternative coding like serial, mkdir, rename, shell, cdate, to mention a few. Just google.

Message 63 of 147
HE-MJJ
in reply to: handjonathan

That is my plan.

 

I assume most of the lisp functions that I created over the years will probably work under AutoCAD LT. I haven't tested them all. It would be a shame if cannot get my most important lisp function, which has a lot of the doslib functions mentioned above, to function under AutoCAD LT. I would like to know beforehand which of these do not have a vla equivalent.

Message 64 of 147
Sea-Haven
in reply to: handjonathan

You can use windows CMD, change to your lisp directory and can run

FINDSTR dos_mkdir *.lsp

will show you every file that contains the dos_mkdir 

 

If you findstr dos_ *.lsp >doslib.txt will show every lisp that has Doslib inside, look at text file doslib.txt.

 

Google the substitute code can then copy and paste into your code a new function into multiple files.

 

Here is one example

; check that pdf directory exists
(setq dwgpre (strcat (getvar "dwgprefix") "\pdf"))
(if (= (vl-file-directory-p dwgpre) nil)
(vl-mkdir dwgpre)
)

 

 

Message 65 of 147
HE-MJJ
in reply to: handjonathan

I noticed ( load "Julian2.lsp") isn't loading under AutoCAD LT. Strange thing is, I cannot find the file on my workstation, but under the AutoCAD full version it loads any way.

Message 66 of 147
JamesMaeding
in reply to: HE-MJJ

(findfile "julian2.lsp") will tell you if found in support paths and where.


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

Message 67 of 147
HE-MJJ
in reply to: JamesMaeding

Got it. Thanks!
"C:\\Program Files\\Autodesk\\AutoCAD 2024\\express\\julian.lsp"
Message 68 of 147
HE-MJJ
in reply to: handjonathan

It seems that under AutoCAD LT my .mnl file isn't loaded along with the menu file. A.f.a.i.k. (With the AutoCAD full version) when loading the menu file the .mnl file will be loaded automatically along with it.

Message 69 of 147
paullimapa
in reply to: HE-MJJ
Message 70 of 147
HE-MJJ
in reply to: handjonathan

I'm looking for replacement dos_drivetype and dos_dirp.

 

Anyone?

Message 71 of 147
paullimapa
in reply to: HE-MJJ

This site gives you a list of the dos_lib functions and what they do

 

paullimapa_1-1709232275954.png

 

 

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 72 of 147
paullimapa
in reply to: HE-MJJ

For dos_dirp discussion:

https://forums.augi.com/showthread.php?123440-(vl-file-directory-p)-mistakes&p=1096863#post1096863

The closest thread I find for dos_drivetype is this which identifies cdrom (site is in another language):

http://www.mjtd.com/thread-79406-1-1.html?_dsign=dba06414

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 73 of 147
paullimapa
in reply to: HE-MJJ

found another more clearer discussion on drivetype...see if you can figure out how modify the code to implement:

https://www.afralisp.net/archive/lisp/script1.htm

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 74 of 147
Sea-Haven
in reply to: handjonathan

In Lt 2024 if Appload has a "start up suite" you may be able to add your lisps etc there to automatically load. If your doing setvars then make them a lisp.

Message 75 of 147
HE-MJJ
in reply to: paullimapa

Found and replaced Dos_dirp with vl-file-directory-p. Thanks.

Message 76 of 147
HE-MJJ
in reply to: paullimapa

It has been a while since I have been programming. Getting older. ; ) I'm having more difficulty to concentrate and dive into bulkes of text. I tried the first routine with "\\root\\cimv2" that resulted for me in "G:". "\\root\\cimv2" needs to be a path to our server I guess?

 

I did get DISKINFO working. Thanks for that! But I only need to get a return value (without dialogebox) wether it is a netwerk drive or not. Must be possible to figure this out with the code provided. Thanks again!

Message 77 of 147
HE-MJJ
in reply to: paullimapa

Got it :thumbs_up:

 

_$ (assoc "H" diskinfo)
("H" "H:" "H:\\" "Network drive" "NTFS" "DATA" "\\\\DATASERVER\\Projecten" "Yes" "2637144060 Kb (2514.98 Gb)" "1227919844 Kb (1171.04 Gb)" "1227919844 Kb (1171.04 Gb)")

Message 78 of 147
paullimapa
in reply to: HE-MJJ

Glad to have helped…cheers!!!


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 79 of 147
HE-MJJ
in reply to: paullimapa

dos_splitpath my next challenge.
Message 80 of 147
paullimapa
in reply to: HE-MJJ

That’s an easy one. I’m sure you can figure that one out. Just search for the slashes and that includes back and forward slashes 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report