tactsong 发表于 2007-9-17 15:02:00
goodyongtao 发表于 2007-10-18 08:37:00
先支持一下wanglin_741 发表于 2007-10-26 19:49:00
请班主作个"图文并茂的制作安装程序教程"吧,大家好渴喔!清河静 发表于 2007-11-17 00:35:00
<font color="#77aa55">是我想找了好久的东西,谢谢~</font>azjmjsj 发表于 2007-12-2 11:27:00
<p><strong>我自己试做的AutoCAD二次开发安装程序,欢迎使用!</strong></p><p><strong><a href="http://www.abofanyi.com/blog">www.abofanyi.com/blog</a> 下载</strong></p>ww810529 发表于 2008-1-12 19:57:00
<p>不错!有vb.net或C#版本吗?</p>cxjzxh 发表于 2008-1-18 14:10:00
秋枫兄,能不能发一份AUTOCAD二次开发安装程式的源码发给我一份,不甚感激!cxjzxf@126.comcaoxianfa 发表于 2008-1-25 22:07:00
<p>有没有人试过用vfp语言来控制cad绘图的呢?</p>aicr317 发表于 2008-2-17 17:01:00
<p>我是用秋枫版主的样列来修改的(只是替换了名称),我把代码贴上来,请教版主如何添加搜索路径,怎么改,添加在哪里,谢谢!</p><p>比如我要添加:D:\SCEI\TQ</p><p> D:\SCEI\FM</p><p></p><p></p><p>;; 首先定义初始化函数<br/>(defun InitsceiApplication (/<br/> ;; 内部函数<br/> GetMyApplicationPath GetsceiPath<br/> strParse StrUnParse<br/> scei_AddSupportPath Load_sceiMenu<br/> scei_placemenu<br/> ;; 局部变量<br/> scei_cmdecho_save<br/> )</p><p>;;; 取得本程序的路径.<br/>;;; 文件路径从注册表中读取,这些信息由安装程序负责写入注册表<br/>;;; ---------------------------------------------------------------------------------<br/> (defun GetMyApplicationPath (AppID)<br/> (vl-registry-read<br/> (strcat<br/> "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"<br/> AppID<br/> "_is1"<br/> )<br/> "Inno Setup: App Path"<br/> )<br/> )</p><p> ;; 这里取得安装后,安装的文件夹的绝对路径<br/> ;; 注意:这里的AppID为"scei", 稍后的安装程序制作向导设置中必须与这里保持一致<br/> (defun GetsceiPath ()<br/> (GetMyApplicationPath "scei")<br/> )</p><p>;;; 解析字符串为表(函数来自明经通道转载)<br/>;;; ---------------------------------------------------------------------------------<br/> (defun strParse (Str Delimiter / SearchStr StringLen return n char)<br/> (setq SearchStr Str)<br/> (setq StringLen (strlen SearchStr))<br/> (setq return '())<br/> (while (> StringLen 0)<br/> (setq n 1)<br/> (setq char (substr SearchStr 1 1))<br/> (while (and (/= char Delimiter) (/= char ""))<br/> (setq n (1+ n))<br/> (setq char (substr SearchStr n 1))<br/> ) ;_ end of while<br/> (setq return (cons (substr SearchStr 1 (1- n)) return))<br/> (setq SearchStr (substr SearchStr (1+ n) StringLen))<br/> (setq StringLen (strlen SearchStr))<br/> ) ;_ end of while<br/> (reverse return)<br/> ) ;_ end of defun</p><p>;;; 反解析表为字符串(函数来自明经通道转载)<br/>;;; ---------------------------------------------------------------------------------<br/> (defun StrUnParse (Lst Delimiter / return)<br/> (setq return "")<br/> (foreach str Lst<br/> (setq return (strcat return Delimiter str))<br/> ) ;_ end of foreach<br/> (substr return 2)<br/> ) ;_ end of defun</p><p>;;; 添加支持文件搜索路径<br/>;;; ---------------------------------------------------------------------------------<br/>;;; note: 第二个参数如果为真, 插最前,否则插最后<br/>;;; <br/> (defun scei_AddSupportPath (PathToAdd isFirst / supportlist)<br/> (if (not<br/> (vl-string-search<br/> (strcase (strcat pathToAdd ";"))<br/> (strcase (strcat (getenv "ACAD") ";"))<br/> )<br/> ) ; 保证不重复添加<br/> (progn<br/> (setq supportlist (strparse (getenv "ACAD") ";"))<br/> (setq supportlist<br/> (vl-remove-if-not<br/> 'vl-file-directory-p<br/> supportlist<br/> )<br/> ) ; 移除不存在的文件夹<br/> (if isFirst<br/> (setq supportlist (cons PathToAdd supportlist))<br/> (setq supportlist (append supportlist (list PathToAdd)))<br/> )<br/> (setenv "ACAD" (strUnParse supportlist ";"))<br/> )<br/> )<br/> )</p><p> ;; 根据不同的AutoCAD版本加载不同的菜单文件。<br/> (defun Load_sceiMenu (/ acadver)<br/> (setq acadver (atof (getvar "acadver")))<br/> (cond<br/> ((and (>= acadver 15.0) (< acadver 16.0))<br/> (command "_menuload" "scei.mns")<br/> )<br/> ((and (>= acadver 16.0) (<= acadver 16.1))<br/> (command "_menuload" "all.mns")<br/> )<br/> ((>= acadver 16.2) (command "_menuload" "scei2006.mns"))<br/> )<br/> )</p><p> ;; 这个函数用来插入菜单条<br/> ;; The following code "placemenu" from LUCAS(龙龙仔)<br/> (defun scei_placemenu (/ n)<br/> (if (menugroup "scei")<br/> (progn<br/> (setq n 1)<br/> (while (< n 24)<br/> (if (menucmd (strcat "P" (itoa n) ".1=?"))<br/> (setq n (+ n 1))<br/> (progn<br/> (if (> n 3)<br/> (setq n (- n 2))<br/> (setq n 3)<br/> ) ;if<br/> ;; 如需插入多条菜单,以反序在这里写:<br/> ;; 因只有一条下拉菜单,因此这里4,3,2条注释掉<br/> ;; (menucmd (strcat "p" (itoa n) "=+scei.pop4"))<br/> ;; (menucmd (strcat "p" (itoa n) "=+scei.pop3"))<br/> ;; (menucmd (strcat "p" (itoa n) "=+scei.pop2"))<br/> (menucmd (strcat "p" (itoa n) "=+scei.pop1"))<br/> (setq n 25)<br/> ) ;progn<br/> ) ;if<br/> ) ;while<br/> ) ;progn<br/> ) ;if<br/> (princ)<br/> )</p><p><br/>;;; 初始化主函数<br/>;;; ---------------------------------------------------<br/>(defun Init_scei ()<br/> ;; 添加支持路径<br/> (AddSupportPath (GetsceiPath) nil)<br/> (AddSupportPath (strcat (GetsceiPath) "<a href="file://tq/">\\tq</a>") nil)<br/> </p><p><br/> ;; 如果菜单组还没有被加载,则加载之<br/> (if (not (menugroup "scei"))<br/> (Load_sceiMenu)<br/> )</p><p> ;; 安排菜单条的位置<br/> (scei_PlaceMenu)</p><p> (princ)<br/>)</p><p>;;; -----------------------------------------------------<br/>;;; main:<br/>;;; -----------------------------------------------------<br/> (setq scei_cmdecho_save (getvar "cmdecho"))<br/> (setvar "cmdecho" 0)</p><p> ;; 加载下拉菜单<br/> (scei_AddSupportPath (GetsceiPath) nil)</p><p> ;; 如果菜单组还没有被加载,则加载之<br/> (if (not (menugroup "scei"))<br/> (Load_sceiMenu)<br/> )</p><p> ;; 插到合适的位置<br/> (scei_placemenu)<br/> (setvar "cmdecho" scei_cmdecho_save)<br/> (setq scei_cmdecho_save nil)</p><p> (princ)<br/>) ;_end of defun initsceiApplication</p><p>(initsceiApplication)</p><p>;; 加载主程序<br/>;; 为节省内存,这里也可以以autoload函数形式定义<br/>;; 有几条写几条<br/>(load "scei.lsp")<br/>(arxload "scei.arx")<br/>(command "vbaload" "ACAD.dvb")</p><p><br/>(princ)</p><p></p><p>;;==================================</p><p></p><p>另外,每次加载的菜单都是在这个位置,如图所示,怎么把它修改后,放在“帮助”一栏的后面?</p><p></p><p>我加载了一个DVB文件,但是每次启动CAD都跳出如下提示,如何能让它不要显示,改如何修改?</p>jiangjun 发表于 2008-4-7 00:54:00
<p>秋枫兄</p><p>CAD2007怎么不能加载菜单呢?</p><p>((and (>= acadver 17.0) (< acadver 18.0))<br/> (command "_cuiload" "dl2007.cui")<br/> )</p><p></p><p>返回:</p><p>命令: (command "_cuiload" "dl2007.cui")<br/>_cuiload<br/>输入要加载的自定义文件的名称: dl2007.cui<br/>无法加载自定义文件: dl2007.cui<br/>该自定义组的名称已存在。</p><p>怎么解决 谢谢</p>