Not applicable
02-05-2016
03:03 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
Can anybody help me debug this code i wrote. Also is there a program I can use to debug my lisp?
I'm a Newbie
(defun c:demo (/ ent flag hnd i lst ss) (if (setq ss (ssget "_X" (list '(0 . "INSERT") '(66 . 1)))) (repeat (setq i (sslength ss)) (setq hnd (ssname ss (setq i (1- i)))) (while (and (setq hnd (entnext hnd)) (setq ent (entget hnd)) (= (cdr (assoc 0 ent)) "ATTRIB") ) (if (wcmatch (strcase (cdr (assoc 2 ent))) "REV,REV*") (setq flag1 T) ) ) ) ) (setvar "tilemode" 1) (setq dr (getvar "dwgname")) (setq a (getvar "EXTMAX")) (setq pt1 (caddr a)) (if ((= pt1 0) (command "_saveas" "2010" (strcat "H:\\2D\\" dr)) ) (cond ((> pt1 0) (setq lay1 (tblsearch "LAYER" "system")) ;((= lay1 flag1) (command "_saveas" "2010" (strcat "H:\\3D\\Cadworx-Titleblock\\" dr))) (lay1 (command "_saveas" "2010" (strcat "H:\\3D\\Cadworx\\" dr))) ((/= lay1 T) (command "_saveas" "2010" (strcat "H:\\3D\\Misc\\" dr))) ) (princ) )
Thanks for the pointers.
LG
Solved! Go to Solution.
Link copied