View Full Version : I am having a problem with TEXTMASK and annotative text
GreyHippo
2008-01-07, 05:35 PM
When I try to use TEXTMASK with annotative text, the text object increases in size. Does anybody know of a fix for this?
Update:
I have found that I don't need to use TEXTMASK for mtext because I can turn on background masking but I still have a problem when i use single line text. I guess I could always just use mtext.
i created some dtext using annotative property. then used the express tool masktex and the text disappeared but masked the lines that ran through the text. if i create dtext w/o annotative property and mask it, it wipes out the lines like it is supposed to. don't have a clue as to why?
I also tried using background masking with annotative mtext with multiple annotative scales. The result was the mask area shows up for all scales, not just the current one. After some more experimention with annotative text, it appears that it is does not play well with masking of any sort.
after a little more playing with it, my statement above is not accurate. this is going to require some more experimentaion.
bob.wahr
2010-06-30, 05:32 PM
I modified the textmask lisp to bring the existing text to the front instead of recreating the text to solve this problem. Did it quickly and sloppily so there is no attempt at elegance just functionality.
; ----------------- MASK USING WIPEOUT FUNCTION ------------------
; This function draws a wipeout under text TXT using the
; offset value OSET
; ----------------------------------------------------------------
(defun acet-textmask-make-wipeout (ENT OSET / TXT TXTLAY TBX WIPOUT TXTYP TXTSTR)
(setq TXT (entget ENT (list "*")) ; Get the text's edata
TXTLAY (cdr (assoc 8 TXT)) ; Get the layer of the text
TXTYP (cdr (assoc 0 TXT)) ; Text or Mtext
TXTSTR (cdr (assoc 1 TXT))
)
(if (/= TXTSTR "")
(progn
(if (= TXTYP "TEXT")
(acet-ucs-cmd (list "_object" ENT)) ; set UCS to object
(acet-ucs-to-object ENT)
)
(setq TBX (acet-geom-textbox TXT OSET)) ; Get the points around the text
(if TBX
(progn
(command "_.pline") ; Create bounding pline box
(while TBX
(command (car TBX))
(setq TBX (cdr TBX))
)
(command "_c")
(command "_.wipeout" "_Polyline" (entlast) "_yes") ; create wipeout entity
(setq WIPOUT (entlast))
(command "_.change" WIPOUT "" "_Prop" "_Layer" TXTLAY "_cOLOR" "255" "") ; and set its layer
(acet-ucs-cmd (list "_previous")) ; reset the ucs
; (entmake TXT) ; recreate text
(setq TXT ENT) ; such that it's on top
(command "_.draworder" TXT "" "Front")
(acet-xdata-set (list WIPOUT "ACET-TEXTMASK"
(list
(list "TextObject" (cdr (assoc 5 (entget TXT))) 1005)
(list "Offset" OSET 1040)
)
)
)
(acet-xdata-set (list TXT "ACET-TEXTMASK"
(list
(list "MaskObject" (cdr (assoc 5 (entget WIPOUT))) 1005)
(list "MaskType" "WIPEOUT" 1000)
(list "Offset" OSET 1040)
)
)
)
(command "_.move" TXT "" "0,0" "0,0")
(acet-group-make-anon (list WIPOUT TXT) "In use by TEXTMASK") ; make the text and wipeout a group
; (entdel ENT) ; delete original text
)
); if TBX
); progn then
); if not ""
)
Powered by vBulletin® Version 4.1.11 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.