- 积分
- 3831
- 明经币
- 个
- 注册时间
- 2010-9-8
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
程序如下: - (defun create_toolbar (/ file lst x)
- (vl-load-com)
- (if (not (menugroup "NICETOOLBAR"))
- (progn
- (alert "\n程序自动创建"NICETOOLBAR"工具栏,请稍后")
- (setq file (open "d:/nice/support/NICETOOLBAR.mnu" "W"))
- (foreach x '(
- "***MENUGROUP=NICETOOLBAR\n\n***TOOLBARS\n**NICETOOLBAR"
- "ID_ZCT001 [_Toolbar("NICE_图框目录工具", _Floating, _Hide, 10, 340, 1)]"
- "ID_ZCT010 [_Button("插入图框", "insertframe.bmp", "insertframe.bmp")]^C^Cnice_insertframe_frame"
- "ID_ZCT011 [_Button("改图图框", "insertframe_change.bmp", "insertframe_change.bmp")]^C^Cnice_insertfram_modify"
- "ID_ZCT012 [_Button("填写图框", "framefillin.bmp", "framefillin.bmp")]^C^Cnice_framefillin"
- "ID_ZCT013 [_Button("点取图框将图签内容匹配给另一个图框", "framematch.bmp", "framematch.bmp")]^C^Cnice_framematch"
- "ID_ZCT014 [_Button("图框及框内图纸移动", "framemove.BMP", "framemove.BMP")]^C^Cnice_move_frame"
- "ID_ZCT015 [_Button("图框页码批量修改", "pagenum.bmp", "pagenum.bmp")]^C^Cnice_numbered"
- "ID_ZCT016 [_Button("插入目录", "directoryinsert.bmp", "directoryinsert.bmp")]^C^Cnice_insertdirectory_frame"
- "ID_ZCT017 [_Button("点取图框将图签内容匹配给一个目录", "directorymatch.bmp", "directorymatch.bmp")]^C^Cnice_directorymatch"
- "ID_ZCT018 [_Button("生成目录", "directorymake.bmp", "directorymake.bmp")]^C^Cnice_makediractory_frame"
- "ID_ZCT019 [_Button("卸载NICE_图框目录工具", "uninstall.bmp", "uninstall.bmp")]^C^Cnice_uninstall"
- )
- (princ (strcat x "\n") file)
- )
- (close file)
- (command "menuload" "NICETOOLBAR.mnu")
- )
- )
- (command "TOOLBAR" "NICE_图框目录工具" "S")
- (princ)
- )
- (defun C:nice_uninstall ()
- (alert "即将卸载工具条\n感谢您的使用。\n有任何意见请反馈至kele99kele@163.com\n\n by【九群】")
- ;(command "TOOLBAR" "nice_图框目录工具" "H")
- (nice_delpath "D:\\nice\\support")
- (nice_delpath "D:\\nice")
- (command "CUIUNLOAD" "nicetoolbar")
- (princ)
- )
- (defun nice_delpath (path / temp)
- (setq temp (getenv "ACAD"))
- (setq temp (vl-string-subst ";" path temp))
- (setq temp (vl-string-subst ";" ";;;" temp))
- (setq temp (vl-string-subst ";" ";;" temp))
- (setenv "ACAD" temp)
- )
- (defun nice_makpath ()
- (setq oldacad (getenv "ACAD")) (princ)
- (if (wcmatch oldacad "*D:\\nice\\support*") ()
- (
- (vl-load-com)
- (vl-mkdir "D:\\nice\\support")
- (setq path "D:\\nice;D:\\nice\\support")
- (setenv "ACAD" (strcat oldacad ";" path))
- )
- )
- (princ)
- )
- (nice_makpath)
- (create_toolbar)
- (load "图框工具.vlx")
|
|