Author Topic: TextMask Dilema...Any Possible Solution?  (Read 6686 times)

0 Members and 1 Guest are viewing this topic.

akdrafter

  • Guest
TextMask Dilema...Any Possible Solution?
« on: January 18, 2007, 08:11:43 PM »
Hello All,

Here I am again. I am trying to find a solution textmasking/unmasking.

So specs....

textmask
masktype = solid
offset = 0.35(or whatever)
color = 155

So, my dilema is that when I edit a piece of text that has a solid textmask, I have to unmask and remask the text. I have kind of worked in some hodge podge of code into the routine I used to edit all kinds of text("TEXT" "MTEXT" "DIMENSION" "ATTDEF" "INSERT"). This kind of works... but there are various things....hahahahaha

1.) If the text does not have a text mask... it masks it. Shouldn't do that.
2.) If I cut and paste from a drawing with text masks to another blank drawing, for some reason the textmasks get "ungrouped". Don't know why.

Anyway, I think you get the idea. The code I use is listed below. (YES, I know you can double click on anything and edit it, I am still a command liner and that is why I use this routine to edit all text... one hand on the mouse and the other on the keyboard. Yeah... I use f for line, v for move...etc etc... basically all quick keys are on the left side of the keyboard...hahahahaha... but all of my quick keys are not in the pgp..I quit using that years ago. :-) )

Thanks for any help.

Code: [Select]
(defun c:EDD ( / *Error* SNM typlst ename typ )
(setvar "CMDECHO" 1)
(defun *Error* (Msg)
(cond
((or (not Msg)
(member Msg '("console break" "Function cancelled" "quit / exit abort"))))
((princ (strcat "\nError: " Msg)))
);cond
;;;
(setvar "CMDECHO" 1)
(princ)
);end error
;;;
(setq SNM(getvar "SNAPMODE"))
(setq typlst '("TEXT" "MTEXT" "DIMENSION" "ATTDEF" "INSERT"))
(setvar "ERRNO" 0)
(setvar "CMDECHO" 0)
(while (/= 52 (getvar "errno"))
(if
(and
(setvar "SNAPMODE" 0)
(setq ename (car (entsel "\nSelect Object or Enter To End: ")))
(member (cdr (assoc 0 (entget ename))) typlst)
)
(progn
(setq typ (cdr (assoc 0 (entget ename))))
(if (= "INSERT" typ)
(command ".ddatte" ename (command))
(progn
(setq GLST (acet-textmask-group-list))
(acet-textmask-unmask ename GLST)
(command ".ddedit" ename (command))
(acet-textmask-make-solid ename 0.25)
)
)
(setvar "errno" 0)
)
(progn
(if (/= 52 (getvar "errno"))
(princ "\nMissed Pick or Wrong Object Type: ")
)
)
);if
(setvar "SNAPMODE" SNM)
);while
(if (= 52 (getvar "errno"))
(exit)
(c:ED)
)
(*Error* nil)
(princ)
);end

And I do not know where this code came from, but credit to the original code writer.

VVA

  • Newt
  • Posts: 166
Re: TextMask Dilema...Any Possible Solution?
« Reply #1 on: January 19, 2007, 10:36:13 AM »
Try It
Code: [Select]
;;;Remove Xdata by Name
;; en - ent
;;Rdn - Name Xdata
(defun mip-delXd ( en Rdn / elist sub)
   (setq elist (entget en (list "*")) sub nil)
   (foreach i (cdr (assoc -3 elist))
     (if (not(wcmatch (strcase(car i))(strcase Rdn)))
       (setq sub (append sub (list i)))
       (setq sub (append sub (list(list (car i)))))))
  (setq sub (cons -3 sub)
        elist (subst sub (assoc -3 elist) elist)
        elist (entmod elist)))
(defun c:EDD ( / *Error* SNM typlst ename typ )
(setvar "CMDECHO" 1)
(defun *Error* (Msg)
(cond
((or (not Msg)
(member Msg '("console break" "Function cancelled" "quit / exit abort"))))
((princ (strcat "\nError: " Msg)))
);cond
;;;
(setvar "CMDECHO" 1)
(princ)
);end error
;;;
(setq SNM(getvar "SNAPMODE"))
(setq typlst '("TEXT" "MTEXT" "DIMENSION" "ATTDEF" "INSERT"))
(setvar "ERRNO" 0)
(setvar "CMDECHO" 0)
(while (/= 52 (getvar "errno"))
(if
(and
(setvar "SNAPMODE" 0)
(setq ename (car (entsel "\nSelect Object or Enter To End: ")))
(member (cdr (assoc 0 (entget ename))) typlst)
)
(progn
(setq typ (cdr (assoc 0 (entget ename))))
(if (= "INSERT" typ)
(command "_.ddatte" ename (command))
(progn
(setq GLST (acet-textmask-group-list))
(acet-textmask-unmask ename GLST)
(mip-delXd ename "ACET-TEXTMASK")        ;--> Add
(command "_.ddedit" ename (command))
(acet-textmask-make-solid ename 0.25)
)
)
(setvar "errno" 0)
)
(progn
(if (/= 52 (getvar "errno"))
(princ "\nMissed Pick or Wrong Object Type: ")
)
)
);if
(setvar "SNAPMODE" SNM)
);while
(if (= 52 (getvar "errno"))
(exit)
(c:ED)
)
(*Error* nil)
(princ)
);end

akdrafter

  • Guest
Re: TextMask Dilema...Any Possible Solution?
« Reply #2 on: January 19, 2007, 07:54:14 PM »
VVA,

Thank you. Works just fine. I will try and break it to see if there might be any potential problems. On the surface though it works fine. This will save me a lot of day to day annoyances.

Thank you.

VVA

  • Newt
  • Posts: 166
Re: TextMask Dilema...Any Possible Solution?
« Reply #3 on: January 22, 2007, 02:20:02 AM »
The matter is that (acet-textmask-unmask ename GLST) for some reason did not delete in this case record about TEXTMASK. It was necessary to make it violently.

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: TextMask Dilema...Any Possible Solution?
« Reply #4 on: January 23, 2007, 12:40:39 PM »
Starting in 06 I believe,  There is a new text property "Background fill"  it ask just like text maks. 

Have a look see.
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

akdrafter

  • Guest
Re: TextMask Dilema...Any Possible Solution?
« Reply #5 on: January 24, 2007, 08:51:39 PM »
Tim,

That works for dims and mtext, but not for dtext. I guess I am a dtext hold out. Never have liked mtext.

Thanks for the input though. Gets me thinking.

Joe Burke

  • Guest
Re: TextMask Dilema...Any Possible Solution?
« Reply #6 on: January 26, 2007, 10:54:38 AM »
Though I know what you mean, I can't help saying there's no such thing as "dtext".

Confusing commands with object types isn't the road to better code.

Regarding mtext, it's like anything else. Use where appropriate. I assume you wouldn't draw a line with the pline command if you just want a line. Same difference.

Regards

akdrafter

  • Guest
Re: TextMask Dilema...Any Possible Solution?
« Reply #7 on: January 29, 2007, 12:28:02 AM »
Indeed...

Hangman

  • Swamp Rat
  • Posts: 566
Re: TextMask Dilema...Any Possible Solution?
« Reply #8 on: January 29, 2007, 04:19:27 PM »
Well, ...  I was hoping you'd have a better, more sophisticated dilemma.  Something to the effect of "the text mask is printing black blotches on my paper."
You're lucky you can get the background fill to work.  We are still in the stone age.  Although we are running 2007, we can't use background fill, we get black blotches on our paper.  Can't find anyone who would know how to fix it.
I've ended up coding in the rastered text mask, we don't know what else to do.

But don't feel to antiquated, We still use dtext for most of our callouts, details, & such.  We only use Mtext for large notes over 6 lines in length.
Hangman  8)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Drafting Board, Mechanical Arm, KOH-I-NOOR 0.7mm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: TextMask Dilema...Any Possible Solution?
« Reply #9 on: January 29, 2007, 04:37:42 PM »
Though I know what you mean, I can't help saying there's no such thing as "dtext".
you dtext Freaks.   
 :-D :-D
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

T.Willey

  • Needs a day job
  • Posts: 5251
Re: TextMask Dilema...Any Possible Solution?
« Reply #10 on: January 29, 2007, 04:50:41 PM »
I love dtext, and hate mtext.  When I see mtext I explode it.  Why use mtext for a single line of notes?  :ugly:  It's beyond me.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

akdrafter

  • Guest
Re: TextMask Dilema...Any Possible Solution?
« Reply #11 on: January 31, 2007, 12:36:55 PM »
Hangman,

I think the key to wipeouts, masking and such is to one, use a non-plotting color and two making sure that the ctb/stb has that color set to a 0 pen weight. Oh and not to mention making sure whoever is doing the wipeout/masking... that they are doing it right. But alas even if they do it right they may still not understand that the text gets sent to the back sometimes and not know to use the "texttofront" command. I think the programmers ... sometimes... make a solution to something and then have to make a solution to their solution. :-)

Hangman

  • Swamp Rat
  • Posts: 566
Re: TextMask Dilema...Any Possible Solution?
« Reply #12 on: February 01, 2007, 10:58:02 AM »
Yesssir, we have tried everything under the sun.  For the background, we had a non-plot color and the CTB file was set to zero.  We still got black squares when printing.  So I went in and created a wipeout on our bubble cuts and made it create a block when it finished.  So the text comes to the front before it creates the block.  It works rather well, but we are still struggling with the background and such.
It's interesting, when we create PDF's, even with the wipeouts, we get black blotches.
We've been told it is our printer drivers and not Autocad.  But everyone else we've talked to that has a XEROX 8830 has no such problem.  Xerox claims their drivers are working with background plotting and are fine.
So it's just our office, ...  my luck.   Very similar to a post I have in General, a text importing problem with '07.  Every time we import an RTF of some general notes, we lose all bulleting features, numbers, letters, everything.  It's just our office, ...  again, my luck.

But hey, I'm being a thread thief.  Don't wanna be a thread thief.  Sorry.
So back to the task at hand, ... 
Hangman  8)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Drafting Board, Mechanical Arm, KOH-I-NOOR 0.7mm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

akdrafter

  • Guest
Re: TextMask Dilema...Any Possible Solution?
« Reply #13 on: February 01, 2007, 12:41:17 PM »
Hangman,

I feel/felt your pain. Some of the tools that come out are better left collecting dust. At least in my not so humble opinion. It gets to a point where old school drafting works more reliably and faster than using the tools that are supposed to make it better. As there are many opinions on this and as my momma says, there is more than one way to skin a cat. The end result though... should look the same no matter who does it. It's a company thing.

Back to the original aspect of this thread.... the text masking. I would have thought that AD would have added the ability to adjust the mask of text if it exists when you edit the text...be it text(hahahah not dtext ;-) ), multi-line text, attdefs...errr... attributes or whatever you prefer to call em all.

When I created the wipeouts for our blocks...at another company... I ended up making a pline....errr.. lwpolyline about 1/128" offset to the outside of the linework. Only visible to the drawer...errr... drafter....errr cadd person. Thing was that it seemed like it took several attempts to get the draworder of everything but the wipeout to the front and have it work correctly in any given drawing. But, finally got it to work and quit messing with it. Also, I saw a thread somewhere about modifying the actual express textmask.lsp file that would automatically change the color of the wipeout to whatever color you had set in your ctb to be non-plotting. Now that was the wipeout of the lwpolyline type, not the solid. I ran into some oposition to using the solid variety because of the draworder sometimes being in the wrong order and solid wipeout being on top and not being able to see what is below.

So, in a nutshell... AD had a good idea. But the idea created a few more things to manage. Kind of like the cure being worse than the disease. Ya know, like the list of side affects are 10 times longer than ingredients. But what cha gonna do.

ramble on.... hahahahaha... back to my lines and circles.

Have an excellent day.