立即注册 登录
晓东CAD家园-论坛 返回首页

eachy的个人空间 http://bbs.xdcad.net/?14 [收藏] [复制] [分享] [RSS]

日志

加载菜单时自动添加菜单所在的路径

已有 175 次阅读2013-5-6 17:36 |个人分类:Lisp


(defun Ea:Addsupport (/ getactiveprofile mnus name n m path mnupath)
  (
defun getActiveProfile ()
    (
strcat "HKEY_CURRENT_USER\"
        (vlax-product-key)
        "
PROFILES"
        (vla-get-activeprofile
          (vla-get-profiles
        (vla-get-preferences (vlax-get-acad-object))
          )
        )
    )
  )
  (setq
    mnus (vlax-get-property
       (vlax-get-property (vlax-get-acad-object) "
application")
       "
menugroups"
     )
  )
  (vlax-for x mnus
    (setq name (cons (vla-get-name x) name))
  )
  (setq    n 1
    m (length name)
  )
  (repeat m
    (if    (setq mnupath (vl-registry-read
                 (strcat (getActiveProfile)
                     "
Menus"
                 )
                 (strcat "
group" (itoa n))
               )
         )   
      (progn
    (if (Wcmatch mnupath "
EATOOLS ")
      (progn
        (setq mnupath (substr (strcase mnupath) 9)
          path      (vl-filename-directory mnupath)
        )      (if (not (wcmatch (strcase (getenv "
ACAD")) "*EATOOLS*"))
        (setenv "
ACAD" (strcat (getenv "ACAD") ";" path))
      )
    )
      )
    )
    (setq n (1+ n))
  )
)

路过

雷人

握手

鲜花

鸡蛋

评论 (0 个评论)

facelist doodle 涂鸦板

您需要登录后才可以评论 登录 | 立即注册

QQ|申请友链|Archiver|手机版|小黑屋|辽公网安备|晓东CAD家园 ( 辽ICP备15016793号 )

GMT+8, 2024-5-14 04:14 , Processed in 0.187459 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

返回顶部