hehoubin
发表于 2012-10-1 12:34:41
老师我想的是增加可选项:(C)重新建C1块)的可选项,用C 唤醒此功能
而不是:(C)重新建C2块)的可选项,用C 唤醒此功能
我还想再增加一个(“C1块”镜像插入)的可选项:该程序需要如何编写呢,下面的是我参照您写的程序写成了“当文件中有C1块时重建块C1块并插入C1块”,还需要您帮忙添加一个(“C1块”镜像插入)的可选项谢谢!
Andyhon
发表于 2012-10-1 13:00:07
添加一个(“C1块”镜像插入)的可选项
添加于何处 亦或是说在那一个 段落 提出此提示
hehoubin
发表于 2012-10-1 13:01:21
Andyhon老师。我想要在程序中的 (progn
(initget 1 "C")
;; 提示((C)重新建C2块)的可选项
(setq pt (getpoint "\nInsert point or (C)重新建C2块: "))
(cond
((= pt "C") (c1 "重新建c2块: " "C2"))
更改成 (progn
(initget 1 "C")
;; 提示((C)重新建C1块)的可选项
(setq pt (getpoint "\nInsert point or (C)重新建C1块: "))
(cond
((= pt "C") (c1 "重新建C1块: " "C1"))
下面的代码是我参照您写的程序写了一下,可以使用,。我还想添加一个将 (“C1块”镜像后插入)的可选项要如何写?
(defun jk1(msg blk)
(princ msg)
(setq ss (ssget)
pt (getpoint "\nBase point: ")
)
(command "_block" blk "non" pt ss "")
(command "_insert" blk "non" pt "" "" "")
)
(defun jk2(msg blk)
(princ msg)
(setq ss (ssget)
pt (getpoint "\nBase point: ")
)
(command "_block" blk "y" "non" pt ss "")
(command "_insert" blk "non" pt "" "" "")
)
(defun c:c1 (/ pt ss)
(if (tblsearch "block" "C1")
(progn
(initget 1 "C")
;; 提示((C)重新建C2块)的可选项
(setq pt (getpoint "\nInsert point or (C)重新建C1块: "))
(cond
((= pt "C") (jk2 "重新建C1块: " "C1"))
(T
(command "_insert" "C1" "non" pt "" "" "")
))
)
(jk1 "\n请选择创建块C1的图元: " "C1")
)
(princ)
)
hehoubin
发表于 2012-10-1 13:38:17
在文件中有“C1块”时有提示(“C1块”镜像插入)的可选项。谢谢
hehoubin
发表于 2012-10-1 13:44:25
谢谢老师“它只是将C1块镜像后插入”,“不是建立镜像的C1块”;老师清楚吗?
Andyhon
发表于 2012-10-1 14:39:07
...将C1块镜像后插入...
有镜像就有镜像线的问题
这部份您目前从缺中
hehoubin
发表于 2012-10-1 20:01:15
哦,是的,我这个还真不懂,默认用Y轴方向以插入点为起点绘制镜像线
“X轴起点以插入点为起点绘制镜像线”为可选项,z轴忽略,
hehoubin
发表于 2012-10-1 20:01:50
老师这样可以吗?
hehoubin
发表于 2012-10-1 20:22:51
先谢谢老师
Andyhon
发表于 2012-10-1 21:05:00
Command: mirror
Select objects: 1 found
Select objects:
Specify first point of mirror line: 以 插入点为起点 回应
Specify second point of mirror line:???