李义东 发表于 2004-1-11 13:55:00

如何获得当前操何作系统盘符和安装目录

用lsp程式如何获得当前操作系统盘符和安装目录

龙龙仔 发表于 2004-1-12 11:52:00

1.当前操作系统盘符
配合doslib
dos_drive

Returns the current drive or changes the current drive to the one specified.

Syntax
(dos_drive )
Parameters
drive
The drive name (for example, C:, D:). If not specified, the current drive is used.

Returns
A string identifying the current or new drive if successful.

nil on error.

Examples
Command: (dos_drive)
"C:"

Command: (dos_drive "d:")
"D:"

2.安装目录??
指的是甚麼??

李义东 发表于 2004-1-12 12:26:00

操作系统安装目录,指windows安装目录,但有的不叫windows而为winnt等.
以上获取当前操作系统盘符之回贴看不懂!请明示!

谢谢大侠回贴!

tukuitk 发表于 2004-1-12 12:32:00

http://www.mjtd.com/mcdown/list.asp?id=191

龙龙仔 发表于 2004-1-12 15:48:00

安装目录
(getenv "Windir") ; 字串-Windows路徑
(getenv "SystemDrive");字串-系統驅動器

李义东 发表于 2004-1-12 23:05:00

谢谢龙版主!!!!!!

ynhh 发表于 2021-4-6 16:52:19

(vlax-get-property (vlax-get-acad-object) 'Path)
页: [1]
查看完整版本: 如何获得当前操何作系统盘符和安装目录