- ;;; Nentsel
- ;;; function : to nentsel a entity In situ
- ;;; arg : string to princ in command-line
- ;;; return : a list ( ename point is-of-block? )
- ;;; Note : if the ename is of a block , the routine copy a similar entity , so you must entdel it later
- ;;; by GSLS(SS)
- ;;;
- (defun ss-Nentsel (msg / en en1 pt mat ins mat ent)
- (setq en (Nentsel msg))
- (if (= (length en) 4)
- (progn
- (setq en1 (car en)
- pt (cadr en)
- mat (caddr en)
- ins (last mat)
- mat (reverse (cdr (reverse mat)))
- mat (append
- (mapcar '(lambda (x y)
- (append x (list y))
- )
- mat
- ins
- )
- '((0. 0. 0. 1.))
- )
- ent (entget en1 '("*"))
- ent (vl-remove (assoc -1 ent) ent)
- en1 (entmakex ent)
- )
- (if en1
- (progn
- (setq obj (vlax-ename->vla-object en1))
- (vla-TransformBy obj (vlax-tmatrix mat))
- (setq en1 (vlax-vla-object->ename obj))
- )
- )
- (list en1 pt T)
- )
- (append en (list nil))
- )
- )
|