编辑器反应器回调函数是大多数操作发生的地方。在调用此函数之前,花园路径边框折线处于“开放修改状态”,也就是说,用户可能仍在 AutoCAD 中操作边框。在反应器序列中,您必须等到 AutoCAD 完成其部分工作,然后才能自由地执行所需的操作。gp:command-ended 以下伪代码说明了函数的逻辑:gp:command-ended Determine the condition of the polyline. CONDITION 1 - POLYLINE ERASED (Erase command) Erase the tiles. CONDITION 2 - LOST ASSOCIATIVITY (Move, Rotate, etc.) Erase the tiles. CONDITION 3 - GRIP_STRETCH - REDRAW AND RE-TILE Erase the tiles. Get the current boundary data from the polyline. If it is a lightweight polyline, Process boundary data as 2D Else Process boundary data as 3D End if Redefine the polyline border (pass in parameters of the current boundary configuration, as well as the old). Get the new boundary information and put it into the format required for setting back into the polyline entity. Regenerate the polyline. Redraw the tiles (force ActiveX drawing). Put the revised boundary information back into the reactor named in *reactorsToChange*. End function 伪代码相对简单,但伪代码中隐藏着几个重要的细节,它们是您目前不会知道的事情。 |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:19
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.