Author Topic: LINE LETTER LISP  (Read 4407 times)

0 Members and 1 Guest are viewing this topic.

ronjonp

  • Needs a day job
  • Posts: 7529
Re: LINE LETTER LISP
« Reply #15 on: August 22, 2008, 11:38:58 AM »
WHAT ABOUT changing the lisp to not break the line but instead add text that has a background mask factor of 1.0

Replace this:
Code: [Select]
    (setq txtobj (vlax-invoke space 'addtext txt pt hgt))
    (vla-put-alignment txtobj acAlignmentMiddleCenter)
    (vlax-put txtobj 'textalignmentpoint pt)
    (vla-put-rotation txtobj ang)
    (vla-put-truecolor txtobj tcolor)
    (vla-put-layer txtobj (vla-get-layer obj))
    (command ".trim" (entlast) "" (list ent pt) "")

With this:
Code: [Select]
    (setq txtobj (vlax-invoke space 'addmtext pt 0.0 txt))
    (vla-put-attachmentpoint txtobj acMiddleCenter)
    (vla-put-insertionpoint txtobj (vlax-3d-point pt))
    (vla-put-rotation txtobj ang)
    (vla-put-truecolor txtobj tcolor)
    (vla-put-backgroundfill txtobj :vlax-true)
    (vla-put-layer txtobj (vla-get-layer obj))

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

SKUI_BREAKER

  • Guest
Re: LINE LETTER LISP
« Reply #16 on: August 25, 2008, 08:25:59 AM »
it doesn't seem to apply the background mask and it didn't give the mtext a defined width so the mask has got and idea of what area it is covering

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: LINE LETTER LISP
« Reply #17 on: August 25, 2008, 09:10:31 AM »
Try adding the vla-put-width
Code: [Select]
    (setq txtobj (vlax-invoke space 'addmtext pt 0.0 txt))
    (vla-put-attachmentpoint txtobj acMiddleCenter)
    (vla-put-insertionpoint txtobj (vlax-3d-point pt))
    (vla-put-rotation txtobj ang)
    (vla-put-truecolor txtobj tcolor)
    (vla-put-width txtobj (cadadr (textbox (entget (vlax-vla-object->ename txtobj)))))
    (vla-put-backgroundfill txtobj :vlax-true)
    (vla-put-layer txtobj (vla-get-layer obj))
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

SKUI_BREAKER

  • Guest
Re: LINE LETTER LISP
« Reply #18 on: August 26, 2008, 06:31:34 AM »
my 2008 is not turning the darned background mask on BUT I AM pretty sure the width is working right :-(

SKUI_BREAKER

  • Guest
Re: LINE LETTER LISP
« Reply #19 on: August 26, 2008, 08:35:25 AM »
OK THE WIDTH ISN'T WORKING EITHER NOW THAT  i think about it maybe should have a version that does 1.5 offset factor and one that does 1.0 factor

i tried to combine two lisp i have but that didn't work either
i have a seperate lisp that will apply a background mask to the mtext i choose so i figured i would insert that and tell it to select "last" object but still no luck.