马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
[ 本帖最后由 st788796 于 2013-7-10 18:20 编辑 ]\n\n[ 本帖最后由 st788796 于 2013-7-10 18:20 编辑 ]\n\n[ 本帖最后由 st788796 于 2013-7-10 12:07 编辑 ]\n\n - (defun XD::String:Parse (str delimiter / post strlst strl)
- (if str
- (progn
- (setq strlst '()
- strl (strlen delimiter)
- )
- (while (vl-string-search delimiter str)
- (setq post (vl-string-search delimiter str))
- (setq strlst (append strlst (list (substr str 1 post))))
- (setq str (substr str (+ post (1+ strl))))
- )
- (vl-remove "" (append strlst (list str)))
- )
- )
- )
- (defun XD::AutoLoadLisp (/ htm Clip_Bord txt path)
- (setvar "cmdecho" 0)
- (vl-cmdf ".copyhist")
- (setq htm (vlax-create-object "htmlfile")
- Clip_Bord (Vlax-Get-Property
- (Vlax-Get htm 'ParentWindow)
- 'ClipboardData
- )
- )
- (setq txt (reverse
- (mapcar 'strcase
- (reverse (xd::string:parse
- (Vlax-Invoke Clip_Bord 'GetData "text")
- "\r\n"
- )
- )
- )
- )
- txt (mapcar '(lambda (x)
- (if (wcmatch x "命令:*")
- (substr x 7)
- (subst x 10)
- )
- )
- tx
- )
- txt (vl-remove-if-not '(lambda (x) (wcmatch x "*LOAD*")) txt)
- )
- ;;晓东通用LISP函数库Build 2013.07.03加载完毕...!
- (if txt
- (progn
- (if (wcmatch (car txt) "*APPLOAD")
- (setq patch (vl-registry-read
- (strcat "HKEY_CURRENT_USER\\"
- (vlax-product-key)
- "\\Profiles\\"
- (Getvar "Cprofile")
- "\\Dialogs\\Appload"
- )
- "Maindialog"
- )
- ) ;_appload 加载的
- (setq path (vl-filename-directory
- (substr (vl-string-trim "(,)" (car txt)) 7)
- )
- ) ;_窗口拖入或者手动加载的
- )
- (if
- (and path
- (not
- (vl-position
- (strcase path)
- (mapcar 'strcase (xd::string:parse (getenv "ACAD") ";"))
- )
- )
- )
- (setenv "ACAD"
- (strcat (getenv "ACAD") ";" path)
- )
- )
- )
- )
- (vlax-release-object htm)
- (princ)
- )
- (defun c:Autoloadlisp () (XD::AutoLoadLisp) (princ "\nStart Command with Autoloadlisp to ADD Support Path!") (princ))
- (princ)
|