Ahankhah Posted January 6, 2021 Posted January 6, 2021 Hi all, I have written a simple routine using "SET" function. It runs in AutoCAD 2021 & 2020 without any problem, but when loading it in AutoCAD 2019 (and also in 2016) I found that "SET" function is redefined by some AutoCAD built-in function (or by Express Tools). It seems to be similar to another function named "SET$" and changes some "Dimensions variables". Do any one know whre this change is made and how I can reset "SET" function to its original definition? I appreciate any help. Quote
dan20047 Posted January 6, 2021 Posted January 6, 2021 (edited) My assumption is that you have customization that is making this change. When I run into problems like this I first search my entire lisp collection for the suspect code "set$". I use Textpad as my editor and it will search folders recursively showing list of files with matches. Another option is a program like Search Everything, https://www.voidtools.com/, which can index every file on multiple drives, and can search for content in the files, though slowly. (I use Search Everything every day as a quick launcher.) A work around would be to put code into the first loaded customization that saves SET to a temporary global variable, and resets it at the last loaded. I can't remember what gets loaded first, but for the last I would use s::startup. : (setq t1 SET) #<<FUNCTION> #x2 @fffdc4e66> : !t1 #<<FUNCTION> #x2 @fffdc4e66> : (setq SET "don't do this") "don't do this" : (SET 'a "b") ; ----- Error around expression ----- (SET 'A "b") ; error : no function definition <SET> ; expected FUNCTION at [eval] : (setq SET t1) #<<FUNCTION> #x2 @fffdc4e66> : (SET 'a "b") "b" : !a "b" Edited January 6, 2021 by dan20047 2 Quote
BIGAL Posted January 6, 2021 Posted January 6, 2021 (edited) Another I use is from CMD level "Findstr" cd to directory to check eg cd c:\acadtemp\lisp Findstr set *.lsp Edited January 6, 2021 by BIGAL 2 Quote
Ahankhah Posted January 9, 2021 Author Posted January 9, 2021 On 1/6/2021 at 10:01 PM, dan20047 said: My assumption is that you have customization that is making this change. When I run into problems like this I first search my entire lisp collection for the suspect code "set$". I use Textpad as my editor and it will search folders recursively showing list of files with matches. Another option is a program like Search Everything, https://www.voidtools.com/, which can index every file on multiple drives, and can search for content in the files, though slowly. (I use Search Everything every day as a quick launcher.) A work around would be to put code into the first loaded customization that saves SET to a temporary global variable, and resets it at the last loaded. I can't remember what gets loaded first, but for the last I would use s::startup. : (setq t1 SET) #<<FUNCTION> #x2 @fffdc4e66> : !t1 #<<FUNCTION> #x2 @fffdc4e66> : (setq SET "don't do this") "don't do this" : (SET 'a "b") ; ----- Error around expression ----- (SET 'A "b") ; error : no function definition <SET> ; expected FUNCTION at [eval] : (setq SET t1) #<<FUNCTION> #x2 @fffdc4e66> : (SET 'a "b") "b" : !a "b" dan20047, You are absolutely right., Thank you very much. 1 Quote
Ahankhah Posted January 9, 2021 Author Posted January 9, 2021 On 1/7/2021 at 3:22 AM, BIGAL said: Another I use is from CMD level "Findstr" cd to directory to check eg cd c:\acadtemp\lisp Findstr set *.lsp BIGAL, thank you for your reply and introducing the program. Quote
BIGAL Posted January 9, 2021 Posted January 9, 2021 Another I use is "Everything" it is a find file program comes in handy. 1 Quote
Ahankhah Posted January 10, 2021 Author Posted January 10, 2021 15 hours ago, BIGAL said: Another I use is "Everything" it is a find file program comes in handy. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.