masterlong 发表于 2011-5-11 16:55:39

(trans (cdr (assoc 10 (entget block-ent))) block-ent 1)

changzhi 发表于 2011-5-11 21:33:57

masterlong 发表于 2011-5-11 23:02:21

changzhi 发表于 2011-5-11 21:33 static/image/common/back.gif
上边程序并不能完全转换正确,郁闷。

上个图看看

yoyoho 发表于 2011-5-15 17:53:46

;;;土法炼钢的方法
(defun c:test_1-1()
(command "ucs" "w")
(command "ucs" "z" "-90")
(command "ucs" "y" "-90")
(setq qq (trans (cdr (assoc 10 (entget (car (entsel))))) 0 1))
(princ qq)
(command "ucs" "w")
(command "id")
)

yoyoho 发表于 2011-5-15 17:58:19

非常感谢masterlong
依据masterlong提供方法测试 o.k.

(defun c:test_1-2()
(setq block-ent (car (entsel)))
(setq qq (trans (cdr (assoc 10 (entget block-ent))) block-ent 1))
(princ qq)
(command "ucs" "w")
(command "id")
)

yoyoho 发表于 2011-5-15 18:07:56

有个困惑可否麻烦masterlong解答
(trans (cdr (assoc 10 (entget block-ent))) block-ent 1)的用法
一般常看到
(trans (cdr (assoc 10 (entget block-ent))) 0 1)

(trans (cdr (assoc 10 (entget block-ent))) 1 0)
第一次看到这种用法
block-ent 1的方式
页: 1 [2]
查看完整版本: 旋转过的图块插入点如何求得?