Search the Community
Showing results for tags 'set'.
Ahankhah posted a topic in AutoLISP, Visual LISP & DCLHi 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.
Dear all, I'm looking for a simple lisp (probably vlisp) routine that can select all leaders of the same type (e.g dot). In other words, i only want to select the dot leaders of all my leaders in the drawing file. Should look something like this: (ssget "x" ("leader")) and ('leadertype 3) Thanks
ryankevin15 posted a topic in AutoCAD 2D Drafting, Object Properties & Interface.
I have been experimenting with generating variables through code rather than defining them manually. The problem is that when the program creates them, they are defined as global variables. Is there a way to generate them as local variables instead? Below is the sample code that I wrote for testing it. ;ListToVariables creates variables named testvar0, testvar1, testvar2, etc. ;Each newly created variable contains the contents of the correlated slot from testlist. (defun c:test ( / testlist ) (setq testlist (list "aaa" "bbb" "ccc" "ddd" "eee")) (ListToVariables testlist) ) (defun ListToVariables ( listname / i ) (setq i 0) (repeat (length listname) (set (read (strcat "testvar" (rtos i 2 0))) (nth i listname)) (setq i (1+ i)) ) (princ) )