Jump to content

Text mask wipeout replacement by background mask


gilsoto13

Recommended Posts

Hi, Everyone...

 

I am wondering if someone is available to work this one out..

 

We all know testmask in autocad does a great job masking all selected text and mtext, It produces wipeouts and groups each text with its own wipeout... we can even re-assign a wipeout to each text object using textmask when the text is modified, the problem appears when we copy /paste those objects to another drawing, the group dissapears and the wipeout remains... then we need to delete them or modify the text..

 

So, a nice background mask toggle routine was made by our partner Alan, another masking routine has been developed by Lee Ambrosius, but they will work for mtext only, and then I got another routine to convert text to individual mtext objects... (I got some routines for this case, but attached one is the one worked best for me, which uses express tools, actually)

 

So, I would like to combine Lee Ambrosius routine with Text to Mtext converting routine so I will be able to select text and mtext at once, and then this new routine will convert selected text to mtext and then now those mtext objects will be added to original selection and all of them will get a background mask of 1.2 with background color.

 

That way we'll have the textmask command replaced by this new routine. the best thing of this one will be that when you modify any text, the mask will follow it, and when you copy /paste any of those texts, the mask will not be detached.

 

is there Anyone who can try to merge TTM2 into MTM for a One Step routine?

 

Also, I found another small lisp (TM4) that does exactly what I need on selected Mtext objects... It adds a backgroung mask to selected mtext objects, using background color and offset =1.15, (I added the background color option). it also brings previously selected objects to front. It will be easier to modify adding the convert text lisp.

-----------------------------------------------------------------

Now I got some help from Charles Butler... he fixed a lisp to convert text objects to mtext objects individually... It's better than previous lisp I used, cause this one doesn´t need express tools, and works even better when defining the four control points or grips for each text converted to mtext...

 

So I replaced it in the attached files

MtextMask.lsp

tm4.lsp

test new text mask.dwg

ttm2.lsp

Link to comment
Share on other sites

Oook, I got some help in another forum and doing some research by myself... so I got this approach... and I like the way it works now... I was dealing on how to add a background fill to dimensions, and I decided just to set Dimtfill =1 and update dimensions to current style..( that work for us).

Another thing I was struggling with is the convertion from text to mtext, so I decided to stick with a lisp to convert them using the txt2mtxt command from the express tools, that one seemed to be the most reliable one, other lisps were usually deleting text, also this lisp was setting mtext such way that changed one row text into 2 row text, so I wanted to set width= 0, then I grabbed a lisp from Alan J. Thompson as function to changed them to width= 0, and that is all..

 

So, It works perfect now for me, but I am still looking for some help to skip selecting all the objects 3 times, and make one selection only... and also would be better to add an UNDO group code to make it easy to undo all just in case...but well.. at least this is a good start for me.

 

;TM9.lsp
;This routine will set a background color fill to all selected text, 
;mtext and dimensions, will update dimensions to current Dimstyle with 
;Dimtfill set to 1 temporarily for this purpose, so works for current 
;Dimscale only, text objects will be converted to mtext with width=0
;It will bring objects in layer 'Dims' to front at the end
;
; Some part of code from Tom Beauford, from AUGI
;http://forums.augi.com/showthread.php?t=77962
; Turns Background mask on text, mtext and dimensions
; Set 'Border Offset Factor' to 1.15
(vl-load-com) 
(defun c:tm9 (/ ss1 num cnt obj ent)
 (setvar "dimtfill" 1)
   (W0)
   (ttm2)
   (prompt "\nSelect all text to apply the background fill...: ")
   (setq ss1 (ssget '((0 . "mtext")))
   num (sslength ss1)
   cnt 0)
 (repeat num
     (setq obj (vlax-ename->vla-object (ssname ss1 cnt)))
         (vlax-put-property obj 'BackgroundFill :vlax-true)
         (setq ent (vlax-vla-object->ename obj)
               elist (entget ent)
               elist (subst (cons 45 1.15)(assoc 45 elist) elist)
               elist (subst (cons 421 256)(assoc 421 elist) elist)
  )
         (entmod elist)
     (setq cnt (1+ cnt))
 ); repeat
   (setq sel1 (ssget "x" '((8 . "Dims,G-Dims,M-Dims,E-Dims,S-Dims,P-Dims"))))
   (setq sel2 (ssget "x" '((0 . "*Dimension*"))))
   (setq sel3 (ssget "x" '((0 . "*Dimension*"))))
 (vl-cmdf "_dimstyle" "apply" sel2 "")
 (vl-cmdf "_draworder" sel3 "" "f")
 (vl-cmdf "_draworder" ss1 "" "f")
 (vl-cmdf "_draworder" sel1 "" "f")
 (princ)
)

;;Using code from robierzogg from HISPACAD
;;http://www.hispacad.com/foro/viewtopic.php?p=142823&sid=b23c3147d2a06a29d1dfd60078f79c08
;;;This routine works only if Express tools are installed
;;; Convert selected text into Mtext 
(defun ttm2 (/ conj n nombre_n pto_insercion nombre_n1 nuevlista) 
 (prompt "\nSelect all text and dimensions...: ") 
 (SETQ conj (ssget '((0 . "TEXT"))) ) 
 (setq n 0) 
 (REPEAT (sslength conj) 
   (setq nombre_n (ssname conj n)) 
   ;Hallamos el punto de inserción 
   (setq pto_insercion (assoc 10 (entget nombre_n))) 
   ;Convert Text to Mtext, using the EXPRESS command
   (command "txt2mtxt" nombre_n "") 
   ;We set their original insertion point 
   (setq nombre_n1 (entlast)) 
   (SETQ nuevlista (SUBST pto_insercion (ASSOC 10 (ENTGET nombre_n1))(ENTGET nombre_n1))) 
   (ENTMOD nuevlista) 
   (SETQ nuevlista (SUBST '(71 . 7) (ASSOC 71 (ENTGET nombre_n1))(ENTGET nombre_n1))) 
   (ENTMOD nuevlista) 
   (setq n (1+ n)) 
 ) 
)
;set width for mtext to zero and defined height to zero 
;Alan J. Thompson
;http://www.cadtutor.net/forum/showthread.php?t=25412
(defun W0 (/ tmp ss lst EntData) 
   (princ "\nSelect all converted text to remove previously assigned width..: ")
 (setq ss (ssget '((0 . "MTEXT")))) 
 (setq lst (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))) 
 (mapcar '(lambda (x) 
            (setq EntData (entget x)) 
        (setq tmp (subst (cons 46 0.0) (assoc 46 EntData) EntData)) 
            (entmod (subst (cons 41 0.0) (assoc 41 EntData) tmp)) 
          ) 
         lst 
 ) 
;  (command ".regen") 
 (princ) 
)

 

Weell,

 

Finally Alan made this little dream come true, here is the final routine to apply a background fill to selected text, mtext and dimensions

------------------------------------

 

Edited: I added an Undo Group (my first time) and also a draworder operation to move everytyhing to the Back so changed mtext will be shown above everything (after you regen manually).. some extra draworder operation are in the code for our office needs.

 

;;; ;BA.lsp  -BACKGROUND FILL ALL-
;;; ;Made for M3 Mexicana. December 2009
;;; ;This routine will set a background color fill to all selected text, 
;;; ;mtext and dimensions, it will update dimensions to current Dimstyle with 
;;; ;Dimtfill set to 1 temporarily for this purpose, so it works for current 
;;; ;Dimscale only, text objects will be converted to mtext with width=0
;;; ;It will bring objects in layer 'Dims' to front at the end
;;; ;Reviewed and modified by: Alan J. Thompson. 
;;;
;;; ; Some part of code from Tom Beauford, from AUGI
;;; ;[url]http://forums.augi.com/showthread.php?t=77962[/url]
;;; ; Set 'Border Offset Factor' to 1.15
(vl-load-com)
(defun c:BA (/ *error* ttm2 ss elist sel1 sel3 dimt)
;;; error handler
 (defun *error* (#Message)
   (and dimt (setvar "dimtfill" dimt))
   (and #Message
        (not (wcmatch (strcase #Message) "*BREAK*,*CANCEL*,*QUIT*"))
        (princ (strcat "\nError: " #Message))
   ) ;_ and
 ) ;_ defun
;;Using code from Roberto Gonzalez -robierzogg- from HISPACAD
;;[url]http://www.hispacad.com/foro/viewtopic.php?p=142823&sid=b23c3147d2a06a29d1dfd60078f79c08[/url]
;;;This routine works only if Express tools are installed
;;; Convert selected text into Mtext 
(command "undo" "begin")  ;beginning of undo group
 (defun ttm2 (name_n / collect n name_n insertpt name_n1 newlist)
   (setq insertpt (assoc 10 (entget name_n)))
;Convert Text to Mtext, using the EXPRESS command
   (command "txt2mtxt" name_n "")
;We set their original insertion point here
   (setq name_n1 (entlast))
   (SETQ newlist (SUBST insertpt (ASSOC 10 (ENTGET name_n1)) (ENTGET name_n1)))
   (ENTMOD newlist)
   (SETQ newlist (SUBST '(71 . 7) (ASSOC 71 (ENTGET name_n1)) (ENTGET name_n1)))
   (ENTMOD newlist)
   (SETQ newlist (SUBST '(46 . 0) (ASSOC 46 (ENTGET name_n1)) (ENTGET name_n1)))
   (ENTMOD newlist)
   (SETQ newlist (SUBST '(41 . 0) (ASSOC 41 (ENTGET name_n1)) (ENTGET name_n1)))
   (ENTMOD newlist)
 ) ;_ defun
 (setq dimt (getvar "dimtfill"))
 (setvar "dimtfill" 1)
 (princ "\nSelect Dimensions and text to apply the background fill and update...: ")
 (and (setq ss (ssget "_:L" '((0 . "MTEXT,*DIMENSION*,TEXT"))))
      (foreach x (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))
        (cond
          ((eq "MTEXT" (cdr (assoc 0 (setq elist (entget x)))))
           (vla-put-backgroundfill (vlax-ename->vla-object x) :vlax-true)
           (setq elist (subst (cons 41 0.0) (assoc 41 elist) elist)
                 elist (subst (cons 46 0.0) (assoc 46 elist) elist)
                 elist (subst (cons 45 1.15) (assoc 45 elist) elist)
                 elist (subst (cons 421 256) (assoc 421 elist) elist)
           ) ;_ setq
           (entmod elist)
          )
          ((eq "TEXT" (cdr (assoc 0 (entget x))))
           (ttm2 x)
           (ssdel x ss)
           (vla-put-backgroundfill (vlax-ename->vla-object (setq elist (entlast))) :vlax-true)
           (ssadd elist ss)
           (setq elist (entget elist))
           (setq elist (subst (cons 45 1.15) (assoc 45 elist) elist)
                 elist (subst (cons 421 256) (assoc 421 elist) elist)
           ) ;_ setq
           (entmod elist)
          )
          (T T)
        ) ;_ cond
      ) ;_ foreach
      (vl-cmdf "_.-dimstyle" "_apply" ss "")
      (vl-cmdf "_.draworder" ss "" "_f")
 ) ;_ and
 (if (setq sel5 (ssget "_X" '((0 . "INSERT")(2 . "CENTER LINE2,COLUMN ROW BUBBLE2,DETAIL BUBBLE 12,DETAIL BUBBLE2,DUST PICK UP POINT2,EQUIPMENT TAG2,FULL SECTION LR2,FULL SECTION UD2,FULL SECTION2,MATCH LINE SP2,MATCH LINE2,NORTH ARROW2,NOTE BOX2,NOTE ENCL2,PARTIAL SECTION T2,PARTIAL SECTION2,PLATE2,REVISION2,SAMPLE NUMBER2,SECTION CUT UD2,SECTION CUT2,STAMP BIG2,STAMP SMALL2,STREAM NUMBER2,STREAM SEQUENCE2,TAG2,TITLE 12,TITLE BUBBLE 12,TITLE BUBBLE2,TITLE2,WORK POINT2,ROOMTAG,ROOMTAG2,DOORTAG,WALLTAG,WINDOWTAG,MULTIPLE DETAIL,IND WALL CEIL 1, IND WALL UP 1, IND WALL L 1, IND WALL R 1, IND WALL DN 1"))))
   (vl-cmdf "_.draworder" sel5 "" "_f")
 ) ;_ if
 (if (setq sel4 (ssget "_X" '((0 . "line,lwpolyline,insert,polyline,arc,circle,spline,hatch,region"))))
   (vl-cmdf "_.draworder" sel4 "" "_b")
 ) ;_ if
 (if (setq sel1 (ssget "_X" '((0 . "leader,*Dimension*"))))
   (vl-cmdf "_.draworder" sel1 "" "_f")
 ) ;_ if
 (if (setq sel3
            (ssget "_X"
                   '((0 . "line,lwpolyline,polyline")
                     (8 . "Dims,Ar-Dims,G-Dims,M-Dims,E-Dims,S-Dims,P-Dims")
                    )
            ) ;_ ssget
     ) ;_ setq
   (vl-cmdf "_.draworder" sel3 "" "_f")
 ) ;_ if
 (setvar "dimtfill" dimt)
 (princ)
(command "undo" "end")  ;end of undo group
) ;_ defun
(princ
 "\Type \"BA\" to mask all text, mtext and dimensions at once."
)
(princ
 "\Remember to set dimscale according to selected dimensions before using it."
)

 

A guy in the autodesk forum asked for multileaders to be added to this lisp.... but Couldn´t even make it work for them.... anyway, it works perfect for us as it is.

 

Thanks Alan... you da man

test new text mask.dwg

Edited by gilsoto13
Link to comment
Share on other sites

  • 2 months later...

Another version of this lisp will add the grips or control points to selected mtext, thanks to Rogerio Brazil for his code to set mtext box to objects and to Marco Jacinto from hispacad for adding this code.

I added a tolerance to mtext width to avoid automatic changing width several times when using the routine.

 

;;; ;BA.lsp  -BACKGROUND FILL ALL-
;;; ;Made for M3 Mexicana. Coding Selected by Paulo Gil. December 2009
;;; ;This routine will set a background color fill to all selected text, 
;;; ;mtext and dimensions, it will update dimensions to current Dimstyle
;;; with
;;; ;Dimtfill set to 1 temporarily for this purpose, so it works for current 
;;; ;Dimscale only, text objects will be converted to mtext with width=0
;;; ;and then will add their text box control points
;;; ;It will bring objects in layer 'Dims' to front at the end, as well as other
;;; ;Draworder operations according to M3 standards.
;;; ;Reviewed and modified by: Alan J. Thompson. 
;;; ;And Marco Antonio Jacinto Perez 
;;; ;December 2009
;;;

(VL-LOAD-COM)
(DEFUN c:BA (/ *error* ttm2 ss elist sel1 sel3 dimt)
;;; error handler
 (DEFUN *error* (#Message)
   (AND dimt (SETVAR "dimtfill" dimt))
   (AND #Message
 (NOT (WCMATCH (STRCASE #Message) "*BREAK*,*CANCEL*,*QUIT*"))
 (PRINC (STRCAT "\nError: " #Message))
   ) ;_ and
 ) ;_ defun
;; Using code from Roberto Gonzalez -robierzogg- from HISPACAD
;; http://www.hispacad.com/foro/viewtopic.php?p=142823&sid=b23c3147d2a06a29d1dfd60078f79c08
;; This routine works only if Express tools are installed
;; Convert selected text into Mtext 

 (COMMAND "undo" "begin")  ;beginning of undo group
 (DEFUN ttm2 (name_n / collect n name_n insertpt name_n1 newlist)
   (SETQ insertpt (ASSOC 10 (ENTGET name_n)))
    ; Convert Text to Mtext, using the
    ; EXPRESS
    ; command
   (COMMAND "txt2mtxt" name_n "")
    ; We set their original insertion point
    ; here
;;;creo que esta parte mueve los nuevos mtextos de posicion hacia arriba
;;;no se por que lo pusieron?
   (SETQ name_n1 (ENTLAST))
   (SETQ newlist (SUBST insertpt
   (ASSOC 10 (ENTGET name_n1))
   (ENTGET name_n1)
   )
   )
   (ENTMOD newlist)
   (SETQ newlist (SUBST '(71 . 7)
   (ASSOC 71 (ENTGET name_n1))
   (ENTGET name_n1)
   )
   )
   (ENTMOD newlist)
   (SETQ newlist (SUBST '(46 . 0)
   (ASSOC 46 (ENTGET name_n1))
   (ENTGET name_n1)
   )
   )
   (ENTMOD newlist)
   (SETQ newlist (SUBST '(41 . 0)
   (ASSOC 41 (ENTGET name_n1))
   (ENTGET name_n1)
   )
   )
   (ENTMOD newlist)
 ) ;_ defun

;;; Aqui pongo la variable Mtexts como un parametro, el cual corresponde al ss
;;; que vas creando con los nuevos Mtextos
 (DEFUN mw5 (mtexts / mtexts idx ename EntData dxf42 dxf43 EntData1)
    ;Reset Width - Mtext
   (IF mtexts
;; Aqui se hace el cambio para que en lugar
;; de cambiar todos los mtextos, solo modifique los que recien creaste
;; (setq mtexts (ssget "_X" '((0 . "MTEXT"))))
;; Rogerio Brazil from an autodesk Discussion groups
;; http://discussion.autodesk.com/forums/thread.jspa?messageID=6339167&tstart=0
     (PROGN
(SETQ idx 0)
(REPEAT (SSLENGTH mtexts)
  (SETQ ename (SSNAME mtexts idx))
  (SETQ EntData (ENTGET ename '("*")))
  (SETQ dxf42 (* (CDR (ASSOC 42 EntData))1.07))
  (SETQ dxf43 (CDR (ASSOC 43 EntData)))
  (SETQ EntData1
  (ENTMOD (SUBST (CONS 41 dxf42) (ASSOC 41 EntData) EntData))
  )
  (ENTMOD (SUBST (CONS 46 dxf43) (ASSOC 46 EntData1) EntData1)
  )
  (SETQ idx (1+ idx))
)    ;progn
     )     ;repeat
     (PRINC "\n Null Selection!")
   )     ;if
   (PRINC)
 )

;;
;;
;;    ; MAIN ROUTINE
;;
;;
;; Some part of code from Tom Beauford, from AUGI
;; http://forums.augi.com/showthread.php?t=77962
;; Set 'Border Offset Factor' to 1.15

 (SETQ dimt (GETVAR "dimtfill"))
 (SETVAR "dimtfill" 1)
 (PRINC
   "\nSelect Dimensions and text to apply the background fill and update...: "
 )
 (AND (SETQ ss (SSGET "_:L" '((0 . "MTEXT,*DIMENSION*,TEXT"))))
      (FOREACH x (VL-REMOVE-IF 'LISTP (MAPCAR 'CADR (SSNAMEX ss)))
 (COND
   ((EQ "DIMENSION" (CDR (ASSOC 0 (SETQ elist (ENTGET x)))))
    (VLA-PUT-TEXTFILL
      (VLAX-ENAME->VLA-OBJECT x)
      :VLAX-TRUE
    )
    (ENTMOD elist)
   )
   ((EQ "MTEXT" (CDR (ASSOC 0 (SETQ elist (ENTGET x)))))
    (VLA-PUT-BACKGROUNDFILL
      (VLAX-ENAME->VLA-OBJECT x)
      :VLAX-TRUE
    )
    (SETQ elist (SUBST (CONS 41 0.0) (ASSOC 41 elist) elist)
   elist (SUBST (CONS 46 0.0) (ASSOC 46 elist) elist)
   elist (SUBST (CONS 45 1.15) (ASSOC 45 elist) elist)
   elist (SUBST (CONS 421 256) (ASSOC 421 elist) elist)
    ) ;_ setq
    (ENTMOD elist)
   )
   ((EQ "TEXT" (CDR (ASSOC 0 (ENTGET x))))
    (ttm2 x)
    (SSDEL x ss)
    (VLA-PUT-BACKGROUNDFILL
      (VLAX-ENAME->VLA-OBJECT (SETQ elist (ENTLAST)))
      :VLAX-TRUE
    )
    (SSADD elist ss)
    (SETQ elist (ENTGET elist))
    (SETQ elist (SUBST (CONS 45 1.15) (ASSOC 45 elist) elist)
   elist (SUBST (CONS 421 256) (ASSOC 421 elist) elist)
    ) ;_ setq
    (ENTMOD elist)
   )
   (T T)
 ) ;_ cond
      ) ;_ foreach
      (VL-CMDF "_.-dimstyle" "_apply" ss "")
      (VL-CMDF "_.draworder" ss "" "_f")
 ) ;_ and
(setq 
   BkLst 
          '("CENTER LINE2"   "COLUMN ROW BUBBLE2"  "DETAIL BUBBLE 12" 
            "DETAIL BUBBLE2"     "DUST PICK UP POINT2"     "EQUIPMENT TAG2" 
            "FULL SECTION LR2"     "FULL SECTION UD2"     "FULL SECTION2"  
            "MATCH LINE SP2"     "MATCH LINE2"     "NORTH ARROW2"     
            "NOTE BOX2"     "NOTE ENCL2"     "PARTIAL SECTION T2"     
            "PARTIAL SECTION2"     "PLATE2"     "REVISION2"     
            "SAMPLE NUMBER2"     "SECTION CUT UD2"     "SECTION CUT2"     
            "STAMP BIG2"     "STAMP SMALL2"     "STREAM NUMBER2"     
            "STREAM SEQUENCE2"     "TAG2"     "TITLE 12"     
            "TITLE BUBBLE 12"     "TITLE BUBBLE2"     "TITLE2"     
            "WORK POINT2"     "ROOMTAG"     "ROOMTAG2"     "DOORTAG"     
            "WALLTAG"     "WINDOWTAG"     "MULTIPLE DETAIL"     
            "IND WALL CEIL 1"     "IND WALL UP 1"     "IND WALL L 1"  
            "IND WALL R 1"     "IND WALL DN 1"     "MULTIPLE DETAIL"
       ) 
   NomBloques (car BkLst) 
   BkName     (mapcar '(lambda    (x) 
             (setq NomBloques (strcat NomBloques "," x)) 
           ) 
              (cdr BkLst) 
          ) 
 ) 
 (if (setq sel5 (ssget "_X" (list '(-4 . "<OR") 
                   ; _Se seleccionan todos los bloques de 
                   ; usuario, despues se procesaran los 
                   ; nombres esto para poder procesar los 
                   ; bloques dinamicos 
                  '(-4 . "<AND") 
                  '(0 . "INSERT") 
                  (cons 2 (strcat NomBloques ",`*U*")) 
                  '(-4 . "AND>") 
                  '(-4 . "OR>") 
            ) 
         ) 
     ) 

   (VL-CMDF "_.draworder" sel5 "" "_f")
 ) ;_ if
 (IF (SETQ sel4
     (SSGET
       "_X"
       '((0
   .
   "line,lwpolyline,insert,polyline,arc,circle,spline,hatch,region"
  )
 )
     )
     )
   (VL-CMDF "_.draworder" sel4 "" "_b")
 ) ;_ if
 (IF (SETQ sel1 (SSGET "_X" '((0 . "leader,*Dimension*"))))
   (VL-CMDF "_.draworder" sel1 "" "_f")
 ) ;_ if
 (IF (SETQ sel3
     (SSGET "_X"
     '((0 . "line,lwpolyline,polyline")
       (8 . "Dims,Ar-Dims,G-Dims,M-Dims,E-Dims,S-Dims,P-Dims")
      )
     ) ;_ ssget
     ) ;_ setq
   (VL-CMDF "_.draworder" sel3 "" "_f")
 ) ;_ if
 (SETVAR "dimtfill" dimt)
 (PRINC)
 (COMMAND "undo" "end")  ;end of undo group
 (mw5 ss)
) ;_ defun
(PRINC
 "\Type \"BA\" to mask all text, mtext and dimensions, adding mtext box"
)
(PRINC
 "\Remember to set dimscale according to selected dimensions before using it."
)

;|«Visual LISP© Format Options»
(80 2 40 2 nil "end of " 60 9 2 0 0 T T T T)
;*** DO NOT add text below the comment! ***|;

Edited by gilsoto13
Link to comment
Share on other sites

  • 1 year later...
for tm4.lsp can we get an addition to that routine to force Mtext defined width to zero

 

Thanks

 

I am not a lisp programming guy... but that would be easy to do... this is a very dirty way...I guess.

 

; Turns Background mask on
; Set 'Border Offset Factor' to 1.15
(defun c:tm4x (/ ss1 num cnt obj ent)
 (setq ss1 (ssget '((0 . "mtext")))
   num (sslength ss1)
   cnt 0)
 (repeat num
     (setq obj (vlax-ename->vla-object (ssname ss1 cnt)))
         (vlax-put-property obj 'BackgroundFill :vlax-true)
         (setq ent (vlax-vla-object->ename obj)
               elist (entget ent)
               elist (subst (cons 45 1.15)(assoc 45 elist) elist)
               elist (subst (cons 421 256)(assoc 421 elist) elist)
  )
         (entmod elist)
     (setq cnt (1+ cnt))
 ); repeat
(W0)
 (vl-cmdf "_draworder" ss1 "" "f")
 (princ)
)

;set width for mtext to zero and defined height to zero 
(defun W0 (/ tmp ss lst EntData) 
 (setq lst (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss1)))) 
 (mapcar '(lambda (x) 
            (setq EntData (entget x)) 
        (setq tmp (subst (cons 46 0.0) (assoc 46 EntData) EntData)) 
            (entmod (subst (cons 41 0.0) (assoc 41 EntData) tmp)) 
          ) 
         lst 
 ) 
;  (command ".regen") 
 (princ) 
)

Link to comment
Share on other sites

Seriously dude, PLEASE take my email out of your post(s).

 

Your email is also in the one at AUGI that you posted. Is he not suppossed to leave it intact?

Link to comment
Share on other sites

Your email is also in the one at AUGI that you posted. Is he not suppossed to leave it intact?

Arg, if I posted it, it was by accident.

Linky?

Link to comment
Share on other sites

Ah, yeah, I made the mistake a few times of including my email addy in my code headers - not anymore.

Thanks.

 

If you find more on CADTutor posted by others, let me know and I will fix. :thumbsup:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...