明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2401|回复: 17

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

  [复制链接]
发表于 2006-11-17 11:07 | 显示全部楼层 |阅读模式

最近我用LISP写了一个程序,在其中定义了两个命令.但每次都要通过在命令行输入这两个命令来运行该程序. 能不能把这两个命令放到CAD菜单中直接点击运行? 就像画一条直线,直接点击工具栏中的按钮,而无需在命令行输入line. 请版主及各位朋友帮帮我,谢谢.

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

Visit Site : http://www.afralisp.net/

search Menu

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

回复:(Andyhon)Visit Site :

Thank you very much, but would you like to give me more instructions? because that Web site includes lot of issues, and I can't find a good solution.

发表于 2006-11-17 14:09 | 显示全部楼层
您使用的版次?
 楼主| 发表于 2006-11-17 14:55 | 显示全部楼层

回复:(Andyhon)您使用的版次?

我用的是autocad2005中文版. 谢谢!

发表于 2006-11-17 17:03 | 显示全部楼层
本帖最后由 作者 于 2006-11-18 17:49:59 编辑

Something like this

//
//      AutoCAD 2005 Menu
//
//

.
.
.

//
//   Begin AutoCAD ToolBars
//

***TOOLBARS

// User Utils
**TB_MyUtils
ID_MyUtils     [_Toolbar("MyUtils", _Floating, _Hide, 1, 1, 1)]
ID_Ccrad       [_Button("改变圆径", "chgrad.bmp", "ICON_24_CIRRAD")]^C^C^P(if ccrad nil (load "ccrad")) (princ);Ccrad;^P
ID_MyCal       [_Button("线上计算机", "ICON_16_CAL", "ICON_24_CAL")]^C^C^P(if c:calc nil (load "calc")) (princ);calc;^P   
ID_Dist_00     [_Button("Dist_00", "Dist_00.bmp", "dist_00")]^C^C^P(if c:dist00 nil (load "dist00")) (princ);dist00;^P
// User Utils


**TB_DIMENSION
ID_TbDimensi [_Toolbar("Dimension", _Floating, _Hide, 100, 130, 1)]
ID_Dimlinear [_Button("Linear Dimension", RCDATA_16_DIMLIN, RCDATA_16_DIMLIN)]^C^C_dimlinear
ID_Dimaligne [_Button("Aligned Dimension", RCDATA_16_DIMALI, RCDATA_16_DIMALI)]^C^C_dimaligned

.
.
.
.

 楼主| 发表于 2006-11-18 09:51 | 显示全部楼层

Andyhon,

To be frankly, I really dont understand above. could you give me more details? thanks you very much.

 

John

 

 

 

 

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


您说定义了两个命令

(defun ???? () ...)
 
 I would like to know ????
 as well as the filename
 
 and upload your menu file in use
 
 或可帮您植入

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

Andyhon,

The filename is "finalnov.lsp"; and in the file, I've defined two commands: one is "jc" , the other one is "pb".  could you help me again? thank you very much.

 

John

 

发表于 2006-11-18 13:01 | 显示全部楼层
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-5-11 01:54 , Processed in 0.149772 second(s), 27 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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