明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2653|回复: 6

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

[复制链接]
发表于 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 [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等.
以上获取当前操作系统盘符之回贴看不懂!请明示!

谢谢大侠回贴!
发表于 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 | 显示全部楼层
谢谢龙版主!!!!!!
发表于 2021-4-6 16:52:19 | 显示全部楼层
(vlax-get-property (vlax-get-acad-object) 'Path)
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2025-10-2 05:05 , Processed in 0.160185 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表