Author Topic: Strikethrough Text with MLINE  (Read 2862 times)

0 Members and 1 Guest are viewing this topic.

sf.designer

  • Mosquito
  • Posts: 4
Strikethrough Text with MLINE
« on: September 11, 2014, 09:34:29 AM »
If a member have a solution, you're my god !!!

Excuse me for my english, i'm french and have'nt a good english teacher.

It is possible to combine lisp "Strikethrough Text" by leemac with this lisp :

(defun c:pl2ml ( / e i l s )
    (if (setq s (ssget '((0 . "LWPOLYLINE"))))
        (repeat (setq i (sslength s))
            (setq e (ssname s (setq i (1- i)))
                  l (entget e)
            )
            (apply 'command
                (append '("_.mline")
                    (apply 'append
                        (mapcar
                            (function
                                (lambda ( x )
                                    (list "_non" (trans (cdr x) e 1))
                                )
                            )
                            (vl-remove-if-not '(lambda ( x ) (= 10 (car x))) l)
                        )
                    )
                    (if (= 1 (logand 1 (cdr (assoc 70 l)))) '("_C") '(""))
                )
            )
        )
    )
    (princ)
)

For Strikethrough Text with MLINE, and after delete Original Polyline
Or if you are a lisp for Strikethrough Text with MLINE directly ???
« Last Edit: September 11, 2014, 12:05:17 PM by sf.designer »

tombu

  • Bull Frog
  • Posts: 289
  • ByLayer=>Not0
Re: Strikethrough Text with MLINE
« Reply #1 on: September 11, 2014, 02:08:53 PM »
Modifying it to draw two polylines would be easier than creating a mline with the spacing you need.  One line through is pretty standard.  It was added to AutoCAD 2015 and works with Multiline text as well.
Tom Beauford P.S.M.
Leon County FL Public Works - Windows 7 64 bit AutoCAD Civil 3D

Lee Mac

  • Seagull
  • Posts: 12913
  • London, England
Re: Strikethrough Text with MLINE
« Reply #2 on: September 13, 2014, 10:41:37 AM »
Please try the attached, adjust the spacing & width parameters noted at the top of the code as required.

Lee

sf.designer

  • Mosquito
  • Posts: 4
Re: Strikethrough Text with MLINE
« Reply #3 on: September 14, 2014, 11:46:59 AM »
Yeah very very thanks lee

Lee Mac

  • Seagull
  • Posts: 12913
  • London, England
Re: Strikethrough Text with MLINE
« Reply #4 on: September 14, 2014, 02:35:45 PM »
Following this request, I have now updated the program on my site to allow the user to define endless custom commands to create any number of lines above, below or through selected text objects.

The new version may be found here - I have included six example programs.

Lee

MeasureUp

  • Bull Frog
  • Posts: 462
Re: Strikethrough Text with MLINE
« Reply #5 on: September 14, 2014, 07:49:59 PM »
Following this request, I have now updated the program on my site to allow the user to define endless custom commands to create any number of lines above, below or through selected text objects.

The new version may be found here - I have included six example programs.

Lee
Thanks Lee for sharing your nice tips and this helps people a lot.
Here is another question:
I know that a prefix of "%%u" creates an underline text while a "%%o" creates an overline text.
What is a prefix to create a strikethrough text?
Thanks.

tombu

  • Bull Frog
  • Posts: 289
  • ByLayer=>Not0
Re: Strikethrough Text with MLINE
« Reply #6 on: September 15, 2014, 10:38:17 AM »
Thanks Lee for sharing your nice tips and this helps people a lot.
Here is another question:
I know that a prefix of "%%u" creates an underline text while a "%%o" creates an overline text.
What is a prefix to create a strikethrough text?
Thanks.
Requires 2015, "%%k" for standard strikethrough text. 
Tom Beauford P.S.M.
Leon County FL Public Works - Windows 7 64 bit AutoCAD Civil 3D

Lee Mac

  • Seagull
  • Posts: 12913
  • London, England
Re: Strikethrough Text with MLINE
« Reply #7 on: September 15, 2014, 12:26:04 PM »
Following this request, I have now updated the program on my site to allow the user to define endless custom commands to create any number of lines above, below or through selected text objects.

The new version may be found here - I have included six example programs.

Lee
Thanks Lee for sharing your nice tips and this helps people a lot.

Excellent, I'm glad it helps!  8-)

MeasureUp

  • Bull Frog
  • Posts: 462
Re: Strikethrough Text with MLINE
« Reply #8 on: September 15, 2014, 06:51:52 PM »
Requires 2015, "%%k" for standard strikethrough text.
Ha, I found it also works with R2014. Thanks for your tip.