CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products []
CZ | EN | DE
Login or
  Visitors: 7205
Plex.Earth connects AutoCAD and Google Earth

CAD tip CAD tip # 14048:

Question CAD 
 %  platform  category 
Q - question

List of disks, CD-ROM drives, USBs and other disk functions for LISP.

A - answer Using the Wbem system API, you can use LISP to detect the list of disk drives in Windows, the list of CD drives (including loaded media), removable USB drives, connected network drives, etc.

You can download the "CDROMs" function library from Download. Load it using APPLOAD. The individual functions return a list of discs and their properties in List form. You can then call the individual LISP functions as follows:

;(CDRoms) - list of CD-ROMs - e.g. ("D:" "E:")
;(USBs) - list of USBs - e.g. ("F:" "H:")
;(CDRomM) - list of CD-ROMs with media status - e.g. (("D:" . "loaded")("E:" . "empty"))
;(AllDisks) - list of all disks - e.g.:
; (("C:" . "localHD")("D:" . "CD-ROM")("F:" . "removable")("X:" . "network"))


Note: these functions are not supported in AutoCAD LT

100% Win  CAD 
29.2.2024    7458×  

See also:
Tip 12306:How to check if a specific application or process is running?

Back   All CAD Tips

Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD:    OS:    Categ: 
Text:  FAQ glossary   

Use Google Earth images in your AutoCAD projects with the Plex.Earth Tools More info

Please use these tips at your own risk.
Arkance Systems is not responsible for possible problems that may occur as a result of using any of these tips.