CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

AutoLISP 开发指南

使用反应器存储数据

2023-1-5 06:53| 发布者: admin| 查看: 284| 评论: 0|来自: 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-5-19 15:29

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部