Can anyone help with question why this lisp crashes progeCAD?
Code: Select all
; Dim2asoc.Lsp - This routine changes all ASSOCIATIVE dimensions
; that have had their values changed by the user
; and resets them all to their default values.
; Warning - works on all layers, whether frozen or not.
;
(defun c:dim2asoc( / ss e ent n spin c )
(defun spin( c )
(cond
((= c "|") "/")
((= c "/") "-")
((= c "-") "\\")
((= c "\\") "|")
)
)
(if
(and
(setq ss (ssget "x" '((0 . "dimension"))))
(progn
(initget "Yes No")
(= "Yes" (getkword "\nThis function will convert ALL dimensions to their default values. \nContinue? Yes/<No>: "))
)
)
(progn
(princ (strcat "\n" (itoa (sslength ss)) " Dimensions to update"))
(setq n -1 c "|")
(princ "\nModifing dimension entity definitions |")
(while (setq e (ssname ss (setq n (1+ n))))
(princ (chr 8))(princ (setq c (spin c)))
(entmod (list (cons -1 e) (cons 1 "")))
)
)
;else
(princ "\nNo dimensions to update")
)
(princ "\n Enter DIM2ASOC to start")
(princ)
)