- ManualLoading.lsp
- --------------------------------------------------------------------------------
- ;;; ManualLoading.lsp
- ;;; For OpenDCL Ver 4.0
- ;;; Edit kwb 20070225 GMT00:00:00
- ;;; Edit orw 20070518 GMT07:30:xx :: added 64 bit arx file selection
- ;;; returns "OpenDCL.x64.17.ARX"
- ;;; Last Edit kwb as suggested by MichaelP 20070608 GMT00:30:xx
- ;;; :: change location of dcl_GETVERSIONEX test.
- ;;
- ;|;;
- ;; This code block loads the OpenDCL.##.arx files if not already loaded
- ;; Note, Loader will return T if loaded or nil otherwise.
- ;;
- ;; If the OpenDCL.##.arx is loaded at startup or demand loaded
- ;; this routine need never run.
- 翻译如下:
- 这个代码块加载OpenDCL.##.ARX文件(如果尚无加载)
- 注意:如果已经加载或者加载成功后,将返回 T 。
- 如果OpenDCL.##.ARX 已经载入,本代码块将不做任何动作。
- ;;|;
- (or dcl_getversionex
- ((lambda (/ PROC_ARCH ARXNAME ARXPATH)
- ;;根据处理器的类型 和 AutoCAD的版本,确定需要加载的ODCL版本。
- (setq ARXNAME
- (strcat "OpenDCL"
- (if
- (and
- (setq
- PROC_ARCH (getenv "PROCESSOR_ARCHITECTURE")
- )
- (< 1 (strlen PROC_ARCH))
- (eq "64"
- (substr PROC_ARCH (1- (strlen PROC_ARCH)))
- )
- )
- ".x64."
- "."
- )
- (substr (getvar "acadver") 1 2)
- ".arx"
- )
- )
- ;;尝试查找,尝试加载。
- (cond
- ((null (setq ARXPATH (findfile ARXNAME)))
- ;;警示用户未能找到 arxfile
- (alert
- (strcat
- "Couldn't find "
- ARXNAME
- "。"
- "\n你可能需要将它添加到Acad支持路径中。"
- )
- )
- )
- ((null (arxload ARXPATH 'NIL))
- ;;警示用户未能加载 arxfile
- (alert (strcat "无法加载" ARXNAME "。"))
- )
- (t)
- )
- )
- )
- )
|