首页 > 互联网 > 求大神,帮忙必须编写一个AUTOLISP的小程序:

求大神,帮忙必须编写一个AUTOLISP的小程序:

互联网 2023-08-12

请高手用AutoLISP编写小程序

(一) (defun c:tuxing1 () (setq Rd (getdist "\n R=:")) (setq Rx (getdist "\n r=:")) (setq p0 (getPoint "\n Enter Center of Circle")) (setq p1 (list(car p0) (+ (+ (cadr p0) Rd) 5))) (setq p2 (list(- (- (car p0) Rd) 5) (cadr p0))) (setq p3 (list(car p0) (- (- (cadr p0) Rd) 5))) (setq p4 (list(+ (+ (car

编写一个AutoLISP程序

;平行四边形 (defun C:pxsb () (setvar "cmdecho" 0) (setq pt1 (getpoint "\n请输入平行四边形起点:")) (setq s1 (getdist pt1 "\平行四边形一个边长:")) (setq s2 (getdist pt1 "\平行四边形另一个边长:")) (setq w (getangle "\平行四边形宽夹角:")) (setq pt2 (polar pt1 0 s1)) (setq pt3 (polar pt2 w s2)) (setq pt4 (polar pt1 w s2)) (command "pline" pt1 pt

autolisp教程 高分悬赏,请高手用AutoLISP编写4个小程序:

(一) (defun c:tuxing1 () (setq Rd (getdist "\n R=:")) (setq Rx (getdist "\n r=:")) (setq p0 (getPoint "\n Enter Center of Circle")) (setq p1 (list(car p0) (+ (+ (cadr p0) Rd) 5))) (setq p2 (list(- (- (car p0) Rd) 5) (cadr p0))) (setq p3 (list(car p0) (- (- (cadr p0) Rd) 5))) (setq p4 (list(+ (+ (car

编写一个AutoLISP程序,画出一条直线,并生成给定数目(N条)的与其平行的直线。

(defun c:hx ( / int1 y0) (setq int1 (getint "\n输入指定绘制数目:")) (if (= int1 nil) (setq int1 1)) (setq y0 0) (repeat int1 (command ".line" (list 0 y0) (list 30 y0) "");绘制长度为30的直线 (princ "\nOK") (setq y0 (+ y0 10)) );end repeat int1 (princ) );end defun ——仅供参考。。。

CAD LISP程序,求高手帮忙。写个小程序

(defunc:tes(/#k1%k1%k2&k1&kw1)
(if(setq&k1(entsel"\n请选择参考圆"))
(progn
(setq#k1(entget(car&k1))&k1(cdr(assoc0#k1)));取得图元名
(if(=&k1"CIRCLE");如果是圆
(progn;那么
(setq%k1(assoc40#k1));取得圆半径
(if(setq&kw1(ssget'((0."CIRCLE"))));框选圆
(progn
(setq&k1(ssname&kw10))
(while&k1
(setq&kw1(ssdel&k1&kw1)
#k1(entget&k1)
%k2(assoc40#k1)
#k1(subst%k1%k2#k1);圆半径替换为参考圆半径
)
(entmod#k1)
(setq&k1(ssname&kw10))
);while
)
);if3
)
);if2
)
);if1
(princ)
);复制到记事本,以【.lsp】为后缀命名。autoLISP加载了,命令:【tes】

标签:IT技术 微信 编程

大明白知识网 Copyright © 2020-2022 www.wangpan131.com. Some Rights Reserved. 京ICP备11019930号-18