Author Topic: An interesting experiment To restore the redefined system function  (Read 238 times)

0 Members and 1 Guest are viewing this topic.

baitang36

  • Newt
  • Posts: 150
As we all know, the system function of AutoLISP can be redefined. After executing (setq + Nil), the + function is erased. But how to restore it?
I found that an unpublished function can do this. After loading and running inip.fas, all modifications will be invalidated.
The test process is as follows:
Command: (setq + Nil)
nil
Command:!+
nil
Command: (load "D:/inip.fas")
nil
Command:!+
#<SUBR @0e15f5a8 +>

The functions used in inip.fas  is not documented in Autodesk and will not be published here. Interested parties can send me messages for private chat.


一个有趣的试验,恢复被重定义的系统函数

大家都知道,autolisp的系统函数是可以被重定义的,执行 (setq + nil)后,+这个函数就被抹掉了。但怎样恢复它呢?
我发现有个未公开的函数可以做到这一点,加载运行inip.fas之后,所有修改就作废了。
试验过程如下:
命令: (setq + nil)
nil
命令: !+
nil
命令: (LOAD "D:/inip.fas")
nil
命令: !+
#<SUBR @0e15f5a8 +>

inip.fas中使用的函数是autodesk没有写入文档的,不在这里公开了,感兴趣者给我发消息私聊吧。
« Last Edit: January 12, 2022, 09:00:12 PM by baitang36 »

baitang36

  • Newt
  • Posts: 150
Re: An interesting experiment To restore the redefined system function
« Reply #1 on: January 14, 2022, 12:13:36 AM »
U29ycnksIEkgZG9uJ3QgdW5kZXJzdGFuZC4gTXkgRW5nbGlzaCBpcyBwb29yIA==