action_tile不能用command来实现insert哇???
autolisp想实现点击DCL的button,实现插入块INSERT的命令,然后插入的块随着鼠标,点击左键及插入块完成 ,但是好像action_tile 不能用command命令来实现Insert,有没程序实现类似的功能呢? 插入的块的是另外一个DWG文件! 退出对话框就能用command了。 vla-insertblock ZZXXQQ 发表于 2015-6-2 13:19退出对话框就能用command了。
没懂什么意思呢?有类似的程序吗? bingshuier 发表于 2015-6-2 21:56 static/image/common/back.gif
没懂什么意思呢?有类似的程序吗?
论坛有许多。找找看。 本帖最后由 llsheng_73 于 2015-6-4 11:06 编辑
(action_tile "burron" "(command \"insert\" ......)")
把command里边的"全部改为\",另外不能进行交互,也就是说COMMAND命令后边的所有选项需要写完整并且正确
如果需要在屏幕上指定插入点,比例,旋转等,刚需要在COMMAND之前加上(done_dialog 0)先退出对话框 Help
A user cannot make an interactive selection while a dialog box is active. If you want the user to make a selection from the graphics screen, you must hide your dialog box and then restore it. Hiding the box is the same as ending it with done_dialog, except your callback function must use the done_dialog status argument to indicate that the dialog box is hidden—as opposed to ended or canceled. Set status to an application-defined value.
在线翻译
一个对话框处于活动状态时,用户就不能互动的选择。如果您希望用户从图形屏幕中进行选择,你必须隐藏您的对话框,然后恢复它。隐藏框结束与 done_dialog 相同,除了您的回调函数必须使用 done_dialog status 参数指示对话框隐藏 — — 相对于结束或取消。将状态设置为应用程序定义的值。 本帖最后由 bingshuier 于 2015-6-11 00:42 编辑
llsheng_73 发表于 2015-6-4 11:03 http://bbs.mjtd.com/static/image/common/back.gif
把command里边的"全部改为\",另外不能进行交互,也就是说COMMAND命令后边的所有选项需要写完整并且正确 ...(defun c:abc()
(setq pt (getpoint "插入点"))
(setq dcl_id (load_dialog "C:\\Users\\Administrator\\Desktop\\lisp\\练习用\\练习.dcl"))
(new_dialog "abc" dcl_id)
(action_tile "accept" "(done_dialog 1)")
(action_tile "cancel" "(done_dialog 0)")
(action_tile "h100" "(done_dialog 0)(h100)")
(start_dialog)
)
(defun h100()
(command "insert" "h100" pt 1 1 1 0)
)
这个是一部分的,但是就是不行呢,不晓得那里有问题呢?
本帖最后由 bingshuier 于 2015-6-11 00:51 编辑
ivde 发表于 2015-6-2 14:18 http://bbs.mjtd.com/static/image/common/back.gif
vla-insertblock(defun c:abc()
(setq pt (getpoint "插入点:"))
(setq dcl_id (load_dialog "C:\\Users\\Administrator\\Desktop\\lisp\\练习用\\练习.dcl"))
(new_dialog "abc" dcl_id)
(action_tile "accept" "(done_dialog 1)")
(action_tile "cancel" "(done_dialog 0)")
(action_tile "h10" "(done_dialog 0)(h100)")
(start_dialog)
)
(defun h100()
(vl-load-com)
(setq aa (vlax-get-acad-object)
bb (vla-get-ActiveDocument aa)
cc (vla-get-ModelSpace bb))
(vla-insertblock cc pt "h100" 1 1 1 0)
(vla-ZoomExtents AcadObject)
)
就是不知道那里没对呢 ,没有反映!!
页:
[1]