明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
12
返回列表 发新帖
楼主: johnwang

如何将自己定义的命令放到菜单中

  [复制链接]
 楼主| 发表于 2006-11-18 16:29 | 显示全部楼层

The style of those two defined commands as follows:

(defun c:jc () ....)
(defun c:jb () ....)

Pls check and adv, thank you very much.

john

 

发表于 2006-11-18 17:44 | 显示全部楼层

Try this Partial menu file attached

usage:

Command: menuload

your may search help file ...

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
 楼主| 发表于 2006-11-19 12:03 | 显示全部楼层

Andyhon,

Thanks for your response, but I still can't find a good answer. those two defined commands as follows:

(defun c:jc () ....)
(defun c:jb () ....)

Pls give me more details, thanks a lot.

发表于 2006-11-19 12:51 | 显示全部楼层
发表于 2006-11-21 12:30 | 显示全部楼层
1、move or copy the file "finalnov.lsp" to searchpath of acad;
2、in the bottom of "acad.mnl",add line as follow:
   (load "finalnov")
3、in any popmenu group,for example "***POP2" of the file "acad.mnu",add line as follow:
   ID_aaaa1 [操作1]^C^Cjc
   ID_aaaa2 [操作2]^C^Cpb
4、in the acad command communicate area,enter command "menu",and select "acad.mnu",select several "ok"。
5、restart acad,your command will work!
whish you luck!
发表于 2006-11-21 12:58 | 显示全部楼层

你可以先用记事本编写一个abc.mnu文件,文件内容如下,编好后保存到CAD文件夹下的SUPPORT文件夹里,文件名为abc.mun,然后用记事本打开autocad.lsp文件在里面找到类似“(autoload "3darray" '("3darray"))”的句子然后在它下面重新起一行编写如下定义

(autoload "jc" '("jc"))

(autoload "jb" '("jb"))

保存后,将你的jc.lsp及jb.lsp拷贝到AUTOCAD 的SUPPORT文件夹下,启动AUTOCAD在“工具—自定义——“中将你的abc.mnu添加进去,应用保存,然后重新启动CAD就可以在CAD的下拉菜单中看到你的“自定义”菜单了就可以直接点击运行。

 

//      cljs.mnu for AutoCAD
//
//


***MENUGROUP=zdy

***POP1
              [自定义程序]
ID_jc         [框架材料计算]^C^C_jc
ID_jb         [盖板材料计算]^C^C_jb

 

 

 

 

 楼主| 发表于 2006-11-21 17:01 | 显示全部楼层

 thanks  liu_kunlun, thanks happyhxj and thanks  Andyhon

To tell you the truth, I'd resolved my problem by myself before I check your great responses to my question today.  I'd like to share my happiness with everybody. my detailed operation as follows.

1:依次点击 工具---自定义----编辑自定义文件----当前菜单.这时当前菜单文件自动打开.

2:确定自定义的命令所在位置,假设我们有两个自定义命令且打算把它们放在"工具"下拉菜单下.  为此,在打开的菜单文件下找到POP6. 在其中的第二行依次输入如下语句.

   ID_命令1     [命令1的文字表述]^C^C_命令1

   ID_命令2     [命令2的文字表述]^C^C_命令2

3. 保存并关闭菜单文件.

4.在命令行输入menu;

5.在对话框中选择修改后的当前菜单文件acad.mnc

6.点击打开,AUTOCAD 自动加载修改后菜单文件.自定义的命令就会出现在你想要它出现的地方.

 

 

 

发表于 2006-11-23 23:55 | 显示全部楼层

你可以自定义快捷按钮,包括按钮图形

在命令行中写入 ^c^c-jc 要在jc后面加一个空格

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-5-10 08:53 , Processed in 0.151083 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表