Jump to content
Ahankhah

Missing original Set function in some versions of AutoCAD

Recommended Posts

Ahankhah

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.

Share this post


Link to post
Share on other sites
dan20047
Posted (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 by dan20047
  • Like 2

Share this post


Link to post
Share on other sites
BIGAL
Posted (edited)

Another I use is from CMD level "Findstr"

 

cd to directory to check

eg cd c:\acadtemp\lisp

Findstr set *.lsp

Edited by BIGAL
  • Like 2

Share this post


Link to post
Share on other sites
Ahankhah
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.

 

  • Like 1

Share this post


Link to post
Share on other sites
Ahankhah
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.

Share this post


Link to post
Share on other sites
BIGAL

Another I use is "Everything" it is a find file program comes in handy. 

  • Like 1

Share this post


Link to post
Share on other sites
Ahankhah
15 hours ago, BIGAL said:

Another I use is "Everything" it is a find file program comes in handy. 

🙏

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...