mText Background Masks

I have noticed that background masks for the mText entity are preserved and displayed in BCAD v8 (source file was created using ACAD 2005LT). However, I am unable to toggle the background mask for mText entities in BCAD...Will there be a background mask toggle available in BCAD v8. I currently switch between ACAD 2005LT and BCAD v8 to fine tune the final DWG plans for printing?Steve MarcotteSeptiCAD.com

Comments

  • Hi,I wrote some simple lisp routines for the task. This adds the commands:mtxfill: toggle background fill/mask on/off in Bricscadmtxcolor: change color of fill/mask (index color only)mtxborder: change margin (fill outside box)Seems to work.Copy the below code to a whatever.lsp file and load it in Bricscad.(defun c:mtxfill ()(setq ent (entget (car (entsel))))(if (= 1 (cdr(assoc 90 ent))) (progn(setq ent (subst (cons 90 0) (cons 90 1) ent ) )(entmod ent))(progn(setq newent (append ent (list(cons 90 1))))(entmod newent))))(defun c:mtxcolor ()(setq ent (entget (car (entsel))))(if (= 1 (cdr(assoc 90 ent))) (progn(setq clr (acad_colordlg 1 nil))(setq ent (subst (cons 63 clr) (assoc 63 ent) ent ) )(entmod ent))))(defun c:mtxborder ()(setq ent (entget (car (entsel))))(if (= 1 (cdr(assoc 90 ent))) (progn(setq brd (getreal "\nEnter mtext fill border:"))(setq ent (subst (cons 45 brd) (assoc 45 ent) ent ) )(entmod ent))))

  • thank you... any idea if these options will be made available through the properties window?Steve

  • I can't speak for developers, but since the functionality is already there I don't see why not.

  • As this only seemed to concern adding one or two extra controls in the properties bar, we thought to quickly take it inbetween other work. Alas, this not only requires adding an extra control, but it requires an extra dialog, which in turn has its subdialogs... We're sorry, but this will have to wait a few more months. Thanks for your patience.

  • Thanks for the feedback, I realize that this is a minor issue. I modified Asbjorn's code examples to create a function that toggles the background on or off (pasted below). I wish there was both white and black, not just white/black. Thanks, Steve(defun c:mtWipe () (setq ent (entget (car (entsel "\nSelect mText entity to toggle background mask:"))))(if (= "MTEXT" (cdr (assoc 0 ent))) (progn(if (= 1 (cdr(assoc 90 ent))) (progn(setq ent (subst (cons 90 0)(cons 90 1) ent))(setq ent (subst (cons 63 254)(assoc 63 ent) ent))(entmod ent)) (progn(setq newent (append ent (list(cons 90 1))))(setq newent (append newent (list(cons 63 254))))(entmod newent) )); end if)(progn(print " Must Select mText Entity"))); end if(princ)); end function

  • Can the background then be used like the wipeout, i.e, does not print entities that are background? I would find this usefull for breaking lines around text or symbols (blocks) without losing the abillity to query the original geometry. Haven't tried the routines posted, just curious of their use.Jerry

  • The mText background are essentially "wipeouts". However the background can not be the same color as the paper (white), since white and black are the same color in CAD.So, in the previous post, the function c:mtWipe, the background color is the lightest gray possible (color # 254).This is the best way to deal with this issue right now...Steve

  • The background masks can also have rgb colors in Bricscad (may limit backward compatibility though). The line added below sets the colour to true white (RGB 255,255,255), which will always print white.(defun c:mtWipe () (setq ent (entget (car (entsel "\nSelect mText entity to toggle background mask:")))) (if (= "MTEXT" (cdr (assoc 0 ent))) (progn (if (= 1 (cdr(assoc 90 ent))) (progn (setq ent (subst (cons 90 0)(cons 90 1) ent)) (setq ent (subst (cons 63 7)(assoc 63 ent) ent)) (setq newent (append newent (list(cons 421 16777215))))(entmod ent) ) (progn (setq newent (append ent (list(cons 90 1)))) (setq newent (append newent (list(cons 63 7)))) (setq newent (append newent (list(cons 421 16777215))))(entmod newent) ) ); end if ) (progn (print " Must Select mText Entity") ) ); end if (princ) ); end function

  • Deleted redundant line from above post.(defun c:mtWipe () (setq ent (entget (car (entsel "\nSelect mText entity to toggle background mask:")))) (if (= "MTEXT" (cdr (assoc 0 ent))) (progn (if (= 1 (cdr(assoc 90 ent))) (progn (setq ent (subst (cons 90 0)(cons 90 1) ent)) (setq ent (subst (cons 63 7)(assoc 63 ent) ent)) (entmod ent) ) (progn (setq newent (append ent (list(cons 90 1)))) (setq newent (append newent (list(cons 63 7)))) (setq newent (append newent (list(cons 421 16777215))))(entmod newent) ) ); end if ) (progn (print " Must Select mText Entity") ) ); end if (princ) ); end function

  • thanks for the commentsteve

  • Try using 255 which is background color.Some new user may find it interresting to read this as well.http://212.35.117.82/forum/topic.jsp?id=5541Slightly undocumented feature but great.CheersPatrik

  • I posted my mtWipe code on the previous link too...I tried using color #255, but its still gray... are you modifying the color table too.. I tried to make color #255 in Bricscad.ctb a TRUECOLOR = White. But this didn't work for me... Steve MarcotteSeptiCAD.com

  • 255 is grey on screen but try printing and you are OK. Even preview is ok.Patrik

  • Patrik,I've tried printing to a printer or a pdf printer... but both still have the light gray background...I'm not worried about this too much... but "It would be nice"Steve

  • v8.2.8 now has this working... i posted a toggle on/off function at the following link.http://www.theswamp.org/index.php?topic=22319.0

  • I have just come across a file with these in. The fact that I couldn't make them go away is more annoying than their being there. I will take the lazy way and use the work you fellows have generously shared.I guess it's a slightly different category, but I miss the ability to edit out control characters from mtext. Some have their effects masked by the mtext editor, but won't actually go away. It was possible with the old editor.I tried substituting notepad for the editor, but some characters don't show there either. They frustratingly, untouchably show in the properties window. Some sort of "dirty" manual editor which shows all the warts in mtext would be nice.

  • I have just come across a file with these in. The fact that I couldn't make them go away is more annoying than their being there. I will take the lazy way and use the work you fellows have generously shared.I guess it's a slightly different category, but I miss the ability to edit out control characters from mtext. Some have their effects masked by the mtext editor, but won't actually go away. It was possible with the old editor.I tried substituting notepad for the editor, but some characters don't show there either. They frustratingly, untouchably show in the properties window. Some sort of "dirty" manual editor which shows all the warts in mtext would be nice.

  • Hello John,could you file a support request and attach a sample drawing containing mtext with such control characters that cannot be removed? We will investigate what goes wrong and work on a solution.Kind regards,Hans

This discussion has been closed.