Message 1 of 16
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Good day all,
I am experiencing an issue with my application of entmod.
After I use entmod to modify the TEXT entity's justification points, (assuming the justification isn't already BC) I expected the assoc 10 point to move, but it doesn't.
What am I missing?
(defun c:testy ( / adoc eFlag cntr *error* ssA pName pList Pt1 Pt2) (vl-load-com) (vla-startundomark (setq adoc (vla-get-activedocument (vlax-get-acad-object)))) (setvar "cmdecho" 0) (setq eFlag 1 cntr 0) (defun *error* (msg) (if (member msg '("Function cancelled" "quit / exit abort" "*Cancel*")) (progn (setvar "cmdecho" 1)(vla-endundomark adoc) (cond ((= eFlag 1) (princ "\n <!> Routine aborted <!> ")) ((= eFlag 2) (princ (strcat "\n\033\n " (itoa cntr) " sets of cable text aligned." "\n <!> Routine complete <!> "))) ) ;cond ) ;progn ) ;if ) ;*error* (princ "\n\033\n...Select text...") (setq ssA (ssget '((0 . "TEXT,MTEXT")(8 . "TEXT")))) (while (< cntr (sslength ssA)) (princ "\n 1 ") (setq pName (ssname ssA cntr)) (setq pList (entget pName)) (if (= (cdr (assoc 0 pList)) "TEXT") (progn (princ "\n 2 ") (setq Pt1 (cdr (assoc 10 pList))) (princ "\n pList1: \n") (foreach pL pList (progn (princ pL)(terpri))) (princ "\n Pt1: ")(princ Pt1)(terpri) (entmod (setq pList (subst (cons 72 1)(assoc 72 pList) pList))) (entmod (setq pList (subst (cons 73 1)(assoc 73 pList) pList))) (setq Pt2 (cdr (assoc 10 pList))) (princ "\n pList2: \n") (foreach pL pList (progn (princ pL)(terpri))) (princ "\n Pt2: ")(princ Pt2)(terpri) (entmod (setq pList (subst (cons 10 Pt1)(assoc 10 pList) pList))) (princ "\n 3 ") ) ;progn ) ;if (princ "\n 4 ") (setq cntr (1+ cntr)) ) ;while (princ "\n 5 ") (setq eFlag 2) (exit) ) ;testy
~Z
Solved! Go to Solution.