TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: josan on April 12, 2019, 06:59:55 PM

Title: Lsip to usb
Post by: josan on April 12, 2019, 06:59:55 PM
Hello, after some searches and not find references, I ask.
How can I send a data from autolisp to a usb port?

Thanks...
Title: Re: Lsip to usb
Post by: BIGAL on April 13, 2019, 12:52:45 AM
When you insert the USB it becomes a drive. It also has a name, you can read the name of the USB so depending on how many you have plugged in you can work out the drive designation.

Command: (vlax-dump-object drv)
; IDrive: Drive Interface
; Property values:
;   AvailableSpace (RO) = 1.20117e+11
;   DriveLetter (RO) = "F"
;   DriveType (RO) = 2
;   FileSystem (RO) = "FAT32"
;   FreeSpace (RO) = 1.20117e+11
;   IsReady (RO) = -1
;   Path (RO) = "F:"
;   RootFolder (RO) = #<VLA-OBJECT IFolder 000001bf486ea458>
;   ShareName (RO) = ""
;   TotalSize (RO) = 6.3995e+11
;   VolumeName = "SAMSUNG"

Your usb should have a name, is this what your after  working out which one to write to.

https://www.cadtutor.net/forum/topic/9848-how-to-get-serial-number-of-hard-drive-by-lisp/ code by ASmi replace 'serialnumber with 'Volumename