CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

AutoCAD 2022 开发者帮助

使用反应器存储数据

2024-5-18 18:42| 发布者: admin| 查看: 18| 评论: 0|原作者: admin|来自: AutoCAD

使用反应器存储数据

您可以通过利用 Visual LISP 反应器的另一个功能(在反应器中存储数据的能力)来解决保存原始配置的问题。当用户首次绘制路径边界时,将反应器与需要保存的数据一起附加到边界。这需要修改主程序函数,如下所示:C:GPath

Defun C:GPath
   Do everything that is already done in the garden path
   (and don't break anything)
   Attach an object reactor to the polyline using these parameters:
      A pointer to the polyline just drawn,
      A list of data that you want the reactor to record,
      A list of the specific polyline object events to be tracked,
      along with the LISP callback functions to be invoked
   End of the object reactor setup
   Attach editor reactor to the drawing editor using the
   following parameters:
      Any data you want attached to the reactor (in this case, none)
      A list of the specific editor reactor events to be tracked,
      along with the LISP callback functions to be invoked
   End of the editor reactor setup
End function

路过

雷人

握手

鲜花

鸡蛋

最新评论

QQ|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 )

GMT+8, 2024-6-27 16:15

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部