TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Hangman on September 16, 2005, 06:26:53 PM

Title: masking bloked text
Post by: Hangman on September 16, 2005, 06:26:53 PM
For the swamp ... ed,
Does anyone have a routine for masking blocked text ???
Or can anyone help me put something together for masking text in a block without taking the text out or exploding or bursting the block ?.

Thanks,
Title: Re: masking bloked text
Post by: CAB on September 16, 2005, 09:59:23 PM
Now that would be a trick.

Perhaps you could nentsel the text & create a copy on top of the block
and then mask that text. Just an idea to play with.
Title: Re: masking bloked text
Post by: Keith™ on September 16, 2005, 10:32:17 PM
if the blocks are anonymous .. or made anonymous it would be easy .. if it were attributes, it would be easy to change the visibility tag of the attribute individually. .. the management of them would be the trick.
Title: Re: masking bloked text
Post by: CAB on September 17, 2005, 12:05:29 AM
Are we talking about this?
How would you mask the text within the block?
Title: Re: masking bloked text
Post by: Keith™ on September 17, 2005, 12:34:05 PM
Ah ... perhaps I misunderstood .. I was thinking he wanted to mask .. as in cover the text .. so it couldn't be seen .. maybe we need some clarification here ...
Title: Re: masking bloked text
Post by: CAB on September 17, 2005, 12:44:53 PM
Yes we are definitely on different pages.
I think the wipeout could be added to the block is that is the direction he is headed.
Title: Re: masking bloked text
Post by: hyposmurf on September 19, 2005, 08:07:45 AM
Shouldnt someone change the subject title from bloked? :-)
Title: Re: masking bloked text
Post by: MP on September 19, 2005, 08:08:57 AM
Shouldnt someone change the subject title from bloked? :-)

I thought it was a Brit thing.
Title: Re: masking bloked text
Post by: Peter Jamtgaard on September 19, 2005, 08:19:00 AM
Try this

Peter Jamtgaard P.E.

Code: [Select]
(defun C:Mask1 (/ objSelection)
 (setq objSelection (vlax-ename->vla-object (car (nentsel "\nSelect object: "))))
 (if (= (vla-get-objectname objSelection) "AcDbText")
  (vla-put-visible objSelection :vlax-false)
 )
 (vl-cmdf "regen")
)

(defun C:UnMask (/ objBlockDefinition objItem objSelection )
 (setq objSelection (vlax-ename->vla-object (car (entsel "\nSelect Block object: "))))
 (if (wcmatch (vla-get-objectname objSelection) "AcDbBlockReference,AcDbMInsertBlock")
  (progn
   (setq objBlockDefinition (vla-item
                             (vla-get-blocks
                              (vla-get-activedocument
                               (vlax-get-acad-object)))
                             (vla-get-name objSelection)
                            )
   )
   (vlax-for objItem objBlockDefinition
    (if (= (vla-get-objectname objItem) "AcDbText")
     (vla-put-visible objItem :vlax-true)
    )
   )
  ) 
 )
 (vla-update objSelection)
 (vl-cmdf "regen")
)


Title: Re: masking bloked text
Post by: Hangman on September 21, 2005, 05:45:58 PM
It never fails ...  I get two seconds to try and close some loose ends and I get interupted.  Grrrr  :realmad:


Sorry guys, I posted this one afternoon and the next morning I got swamped, ...  Literally !!!

Yes CAB, I want to mask the text with a wipeout so the lines behind it would not show through the text.  Placing the text in front of the lines.
I don't necessarily need to place the mask or wipeout in with the attribute blocked text, but If I have a block, a callout for example, at some angle, I want to mask the text having the wipeout fit the length and angle of text but not necessarily a part of the block.