
(setq ColorCode (getint "\n请输入字体颜色代码(红1/黄2/绿3/青4/蓝5/紫6/白7):")) *
(command "-layer" "m" "编号" "c" "7" " " "") *
(command "-style""编号""romans""0""0.5""0""n""n""n") *
(command "osmode" "0") *
(command "_color" ColorCode) *
(setq Radius (getdist "\n请输入圆圈半径: ")) *
(setq Num (getint "\n请输入起始编号:")) *
(while (>ColorCode 0) *
(setq CenterPt (getpoint "\n请指定下一个点: ")) *
(if CenterPt *
(progn *
(command "circle" CenterPt Radius) *
(command "text" "j" "m" CenterPt (* 1.2 Radius) "0" Num) *
(setq Num (+ Num 1)) *
) *
(setq ColorCode 0) *
) *
)
(command "-layer" "m"前余 "0" "c" "7" " " "")
(command "-style""standard""宋体""0""1""0""n""n""n")
(command "color" "bylayer")
(command "osmode" "699")
(princ)
)
*******************************************
************以下为新建圆形视口程序*************
(defun c:wc()
(setq CenPt (getpoint "\n请指定圆心: "))
(setq SenPt (getpoint CenPt "\n请陪悔斗指定圆周点: "))
(command "-vports" "p" SenPt "a" "ce" CenPt "a" 359.99999 SenPt "cl")
(princ)
)
*******************************************
(defun c:tt()
(command "undo" "1" )
(princ)
)
(prompt "\n<<NNN>>")
(prin1)
看这个行不行。把代码复制到记事本,扩展名改为*.lsp 打开CAD,工具-->AutoLISP-->加载 加载保存的lsp文件 然后在命令行打nnn 就可以使用了》
能用芦磨的话记得加分哦 o(∩_∩)o...
用cad的visual lisp编辑器编写,或者用txt编写代码并将txt文档郑帆尺另存为.lsp文件。打开cad,工具->加载应用程序....->在d出的对话框中选择.lsp文件
程序加载后,输入命令轿颂运行lsp。
这里的命令是代码里面自己喊高设计的命令。
我这里有简单的入门资料,需要的话给我发邮件 sepsnow@126.com
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)