TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: baitang36 on January 12, 2022, 08:30:06 PM

Title: An interesting experiment To restore the redefined system function
Post by: baitang36 on January 12, 2022, 08:30:06 PM
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没有写入文档的,不在这里公开了,感兴趣者给我发消息私聊吧。
Title: Re: An interesting experiment To restore the redefined system function
Post by: baitang36 on January 14, 2022, 12:13:36 AM
U29ycnksIEkgZG9uJ3QgdW5kZXJzdGFuZC4gTXkgRW5nbGlzaCBpcyBwb29yIA==