Might have to just add a filter for them in the COND statement, and do them another way.
- (defun c:sclAll (/ *error* BLKS DOC ENT I MA MI OBJ PTLST SCL SS UF) (vl-load-com) (defun *error* (msg) (and uF (vla-EndUndoMark doc)) (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*") (princ (strcat "\n** Error: " msg " **"))) (princ)) (setq blks (vla-get-Blocks (setq doc (vla-get-ActiveDocument (vlax-get-acad-object))))) (initget 7) (setq scl (getreal "\nSpecify Scale Factor: ")) (if (setq i -1 ss (ssget "_:L")) (progn (setq uF (not (vla-StartUndoMark doc))) (while (setq ent (ssname ss (setq i (1+ i)))) (setq obj (vlax-ename->vla-object ent)) (cond ( (eq "INSERT" (cdr (assoc 0 (entget ent)))) (if (not (eq :vlax-true (vla-get-isXRef (vla-item blks (vla-get-Name obj))))) (vla-ScaleEntity obj (vla-get-InsertionPoint obj) scl))) ( (wcmatch (cdr (assoc 0 (entget ent))) "*LEADER")) ( (wcmatch (cdr (assoc 0 (entget ent))) "*TEXT") (vla-ScaleEntity obj (vlax-get-property obj (if (eq "AcDbText" (vla-get-ObjectName obj)) (if (eq acAlignmentLeft (vla-get-Alignment obj)) 'InsertionPoint 'TextAlignmentPoint) 'InsertionPoint)) scl)) (t (vla-getBoundingBox obj 'Mi 'Ma) (setq ptLst (mapcar (function vlax-safearray->list) (list Mi Ma))) (vla-ScaleEntity obj (vlax-3D-point (polar (car ptLst) (apply (function angle) ptLst) (/ (apply (function distance) ptLst) 2.))) scl)))) (setq UF (vla-EndUndoMark doc)))) (princ))
|