Page 1 of 1

text masking

PostPosted: Wed Sep 21, 2011 10:18 pm
by Pin Cushion
I am running CARLSONv2012|iCAD6.6 and would like to know how to make my text "mask" the line work behind it... like in aCAD. Should I explain more or is that good enough?

Is this possible?

PostPosted: Wed Sep 21, 2011 10:25 pm
by Pin Cushion
... okay so typing the command works, but it is not "dynamic" and doesn't move with the text. Is there another way that is "dynamic?"

PostPosted: Thu Sep 22, 2011 1:25 pm
by Slim
Have you tried using MText with the Background Mask feature turned on?

PostPosted: Thu Sep 22, 2011 1:30 pm
by Pin Cushion
No Sir, I am brand new to Carlson and iCAD. Could you please elaborate.

PostPosted: Thu Sep 22, 2011 5:18 pm
by Slim
If you have a piece of MText, highlight it, go to the properties dialog box, scroll down till you see Background Mask in the Text section, it will most likely say No in the box, click on the box an ellipsis will appear click on that, a small dialog box should come up, check the Use Background Mask box, then check the Use drawing background color. That should give you some text that the masking moves with.

I'm using AutoCAD Embedded Carlson so results may not be the same.

PostPosted: Thu Sep 22, 2011 5:28 pm
by Pin Cushion
yeah... it is not the same. I am familiar with the aCAD way.

PostPosted: Fri Sep 23, 2011 5:36 pm
by Pin Cushion
FYI

WIPEOUT command to turns the frames on. so they can me moved.

PostPosted: Fri Sep 23, 2011 7:31 pm
by gskelhorn
Can't say I have used the text mask function in Carlson but from what you describe I would expect the text and the wipeout to be grouped together in an anonymous block.

Okay, I just took a look with Carlson 2012 using ICAD 6.6 and the wipeout is not centered on the text plus there is no anonymous group.

If you intend to use this much you might want to send in a support request to see if this is working as intended.

PostPosted: Mon Sep 26, 2011 1:26 pm
by Pin Cushion
My frames are centered and working properly on my machine.

PostPosted: Mon Sep 26, 2011 4:40 pm
by gskelhorn
Hmmm... trying a larger offset value does offset all the way around but it is not centered for me. With a small offset it is not centered at all. The wipeout is positioned along the bottom of the text but there is a margin at the top.

Good it works for you.

PostPosted: Mon Sep 26, 2011 5:32 pm
by gskelhorn
If you are using Intellicad v7.1 with Carlson 2012 the functions below will turn on and off the MText background. A toggle function would be easy enough to make so it did not change an exiting border width...

I'm sure the MText editor and properties panel will soon be expanded to allow easier control of the background.

Not sure how pratical this is though since Intellicad 6.6 can not handle the MText backgrounds... Fun to play with just the same.

Code: Select all
;;; File: MTB.lsp
;;;
;;; Test adding a background mask to existing MTEXT with Intellicad 7.1

(defun MTBERR ( msg / )
    (if (not (member msg '("console break" "Function Cancelled")))
        (princ (strcat "\nError: " msg "\n"))         ;print message
    )
    (command "_undo" "_back")
    (setq *error*   nss:*oe*
          nss:*oce* NIL
          nss:*oe*  NIL
    )
   
)
(defun C:MTBON ( / ed bw)
    (setq nss:*oe* *error*)
    (setq *error* MTBERR)
    (setq nss:*oce* (getvar "cmdecho"))         
    (setvar "cmdecho" 0)
    (command "undo" "m")
   
    (prompt "Turning background mask on for MText: ")
    (setq ss (ssget '((0 . "MTEXT"))))

    (initget 7)
    (setq bw (getreal "Enter background mask scale: "))
    (setq len (sslength ss)
          i   0
    )
    (repeat len
        (setq ed (entget (ssname ss i)))
        ;; make sure required dxf codes are in association list and set value
        (mapcar
            '(lambda(x)
                (if (not (assoc (car x) ed))
                    (setq ed (append ed (list x)))
                    (setq ed (subst x (assoc 90 ed) ed))
                )
            )
            (list
                '(90 . 3)    ; 1 (bkg fill on) + 2 (dwg wind colour) = 3
                (cons 45 bw) ; fill box scale (1 = mtext box size)
            )
        )
        (entmod ed)
        (setq i (1+ i))
    )
    (setvar "cmdecho" nss:*oce*)
    (setq *error*   nss:*oe*
          nss:*oce* NIL
          nss:*oe*  NIL
    )
    (gc)
    (princ)
)

(defun C:MTBOFF ( / ed)
    (setq nss:*oe* *error*)
    (setq *error* MTBERR)
    (setq nss:*oce* (getvar "cmdecho"))         
    (setvar "cmdecho" 0)
    (command "undo" "m")
   
    (prompt "Turning background mask off for MText: ")
    (setq ss (ssget '((0 . "MTEXT"))))

    (setq len (sslength ss)
          i   0
    )
    (repeat len
        (setq ed (entget (ssname ss i)))
        (if (assoc 90 ed)
            (progn
                (setq ed (subst (cons 90 0) (assoc 90 ed) ed))
                (entmod ed)
            )
        )
        (setq i (1+ i))
    )
    (setvar "cmdecho" nss:*oce*)
    (setq *error*   nss:*oe*
          nss:*oce* NIL
          nss:*oe*  NIL
    )
    (gc)
    (princ)
)