Author Topic: Lsip to usb  (Read 1392 times)

0 Members and 1 Guest are viewing this topic.

josan

  • Mosquito
  • Posts: 15
Lsip to usb
« 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...

BIGAL

  • Swamp Rat
  • Posts: 1396
  • 40 + years of using Autocad
Re: Lsip to usb
« Reply #1 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

A man who never made a mistake never made anything