Search the Community
Showing results for tags 'set'.
Found 3 results
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) )