Community
How can I access the system info to get what server name a network dirve is mapped with visual lisp?
Solved! Go to Solution.
Solved by Gary_J_Orr. Go to Solution.
For Windows file system information I usually use the Windows "Scripting.FileSystemObject"
Help can be found at Microsoft.com developer help.
Some basics to get you started (copied out of an old file syncronizing utility):
(princ "\nStarting scripting Interface") (setq scrptobj (vla-getinterfaceobject (vlax-get-acad-object) "scripting.filesystemobject")) ;get a folder (setq sourcefoldobj (vlax-invoke-method scrptobj "getfolder" sourcefolder)) ;get a drive (setq sourcedrv (vlax-get-property sourcefoldobj "Drive")) ;Check Drive types ;0=unknown ;1=removable(floppy/zip) ;2=fixed(hard drive) ;3=remote(network) ;4=cdrom ;5=ramdisk??? (if (= 2 (vlax-get sourcedrv "DriveType")) (progn (alert "Check Drive Mappings. You're copying from a Local Hard Drive") (exit) ) )
A few vlax-dump-object calls on some of the above may get you a long way.
Happy Lisping
-Gary