在帮助文件中查找系统变量:USERR1、USERR2等
您可以将宏添加到自定义CUI中,以便无论是使用下拉菜单还是工具栏等自动加载宏。您也可以使用Acaddoc。lsp文件(需要创建)和appload对话框中的启动套件。
试试这个。。。
-
- ;-----------------
- ;Get time and date
- ;-----------------
- ;Get Date
- (defun c:GetDateTime ( / )
- (setq d (rtos (getvar "CDATE") 2 6)
- yr (substr d 3 2);extract the year
- mo (substr d 5 2);extract the month
- day (substr d 7 2);extract the day
- );setq
- ;Get Time
- (setq d (rtos (getvar "CDATE") 2 6);extract the hour
- hr (substr d 10 2)
- m (substr d 12 2);extract the minute
- );setq
- (alert
- (strcat
- "Date: "(strcat day "/" mo "/" yr)
- "\nTime: "(strcat hr ":" m )
- );strcat
- );alert
- (princ)
- );defun
|