Search the Community
Showing results for tags 'debugging'.
-
I need help in debugging the following code: (defun c:spool_labels ( / prefix cnt pt ol) (setq prefix (getstring t "\nENTER PREFIX: ") cnt (getint "\nENTER INTEGER TO START: ") ;; value to start the counter at ol (getvar 'clayer) oa (getvar 'attdia) ) ;; Turn dialog off for the attributes (setvar 'attdia 0) ;; Create layer for the blocks to be inserted on (command "-layer" "make" "Blocks-Spool Label" "color" "magenta" "" "") (while (setq pt (getpoint "\nPICK INSERTION POINT: ")) ;; get insertion point for block (command ".-insert" ;; command to insert a dynamic block "_MP Spool Label" ;; name of block to insert pt ;; insertion point for block 1 ;; scale value for the block 0 ;; rotation value for the block ;; concatenate the prefix to the counter for the name (strcase (strcat prefix (itoa cnt))) ) ;; increment the counter (setq cnt (1+ cnt)) ) ;; restore change system values (setvar 'clayer ol) (setvar 'attdia ol) (princ) ) The output of the code: Command: SPOOL_LABELS ENTER PREFIX: 4" CND # ENTER INTEGER TO START: 1 PICK INSERTION POINT: Unknown command "\". Press F1 for help. Block gets inserted but the attribute does not get filled in. Any help with this will be greatly appreciated.
-
Tutorial: Debugging Code with the Visual LISP Editor
Lee Mac posted a topic in AutoLISP, Visual LISP & DCL
Just finished writing this tutorial with the aim to provide an overview of the various ways to debug code using the Visual LISP Editor. I've tried to incorporate many facilities of the VLIDE into the tutorial, so excuse me if it seems a tad drawn out in places. Of course, comments for improvements are welcome, along with the discovery of any typos & mistakes (there are bound to be some!) http://lee-mac.com/debugvlide.html Enjoy, Lee