AutoCAD 2013/2014/2015

Reply
Valued Contributor
Simon_Weel
Posts: 79
Registered: ‎12-11-2008
Message 1 of 5 (1,171 Views)
Accepted Solution

Mtext change bullet symbol

1171 Views, 4 Replies
09-19-2012 02:49 AM

When I create Mtext with a Bullet list, I want to change the bullet to something of my own choosing, instead of the blakc dot. I've been looking into this before, but couldn't find a solution. Some time back, I received a drawing from someone else. See attachment. It contains a piece of Mtext wich uses an alternative bullet, in this case a hyphen. So it CAN be done. Only thing is, I can't figure out HOW they did it?

 

Anyone?

 

Simon

*Expert Elite*
pendean
Posts: 21,798
Registered: ‎11-06-2003
Message 2 of 5 (1,162 Views)

Re: Mtext change bullet symbol

09-19-2012 05:25 AM in reply to: Simon_Weel
  • Start MTEXT and draw your box.
  • Click Bullets and Lists. Verify that Allow Auto-list and Allow Bullets and Lists are selected (tick mark)
  • click Options  Symbol  Other.
  • The Character Map dialog box appears.
  • Double-click a symbol to copy it to the clipboard.
  • Close the Character Map dialog box.
  • Paste the symbol to the drawing, and press the up-arrow and End key to return the cursor to the same line.
  • Press TAB.
  • Enter the text of the list item. Press ENTER to move to the next item, or press SHIFT+ENTER to add a plain paragraph before the next item.
  • The bullet character is automatically added to the next item.
  • Press ENTER twice to end the list.

For more info, start HELP and look up the topic

"To Create a Bulleted List in Multiline Text as you Type"

 

Dean Saadallah Blog | Facebook | Google+ | Twitter | PINS
Valued Contributor
Simon_Weel
Posts: 79
Registered: ‎12-11-2008
Message 3 of 5 (1,148 Views)

Re: Mtext change bullet symbol

09-20-2012 03:22 AM in reply to: pendean

Easier then I thought! After posting my question, I started working on a LISP routine to change the bullet, see below. If I had read the forum before doing so, I could have saved time :smileyhappy:

 

;; The base of this routine is blatantly stolen from Lee Mac (http://lee-mac.com/)
;;
;; Modified to change the standard bullet symbol in Mtext.
;; It extracts every bullet from a string and sets this as 'oldbullet'.
;; Note: The routine searches for the start (semicolon) and end (curly brace)
;; of the bullet and takes the text in between as being the bullet.
;; Bullets always end with a tab (\t) but searching for a '}' is easier :)
;; vl-string-subst only replaces the first occurence of a string, so you have
;; to create some kind of loop to process all occurences of a bullet.
;; There is NO errorchecking.
;;
;; Replace the value for 'newbullet' with whatever you like!
;;
;; Piece of Mtext with Standard bullet:
;; "\\pxi-3,l3,t3;{\\fSymbol|b0|i0|c2|p18;·\t}This is line 1\\P{\\fSymbol|b0|i0|c2|p18;·\t}This is line 2"
;;

(defun c:bulletchange (/ newbullet oldbullet i ss ent elst)
 (setq newbullet "-")
 (if (setq i  -1
           ss (ssget "_:L" '((0 . "MTEXT")))
     )
  (while (setq ent (ssname ss (setq i (1+ i))))
   (setq oldbullet
         (substr (cdr (assoc 1 (entget ent)))
                 (+ (vl-string-position (ascii ";") (cdr (assoc 1 (entget ent)))) 2)
                 (- (vl-string-position (ascii "}") (cdr (assoc 1 (entget ent))))
                    (vl-string-position (ascii ";") (cdr (assoc 1 (entget ent))))
                 )
         )
   )
   (while (vl-string-search oldbullet (cdr (assoc 1 (entget ent))))
    (entmod
     (subst (cons 1
                  (vl-string-subst (strcat newbullet "\t}") oldbullet (cdr (assoc 1 (setq elst (entget ent)))))
            )
            (assoc 1 elst)
            elst
     )
    )
   )
  )
 )
 (princ)
)

 

*Expert Elite*
pendean
Posts: 21,798
Registered: ‎11-06-2003
Message 4 of 5 (1,138 Views)

Re: Mtext change bullet symbol

09-20-2012 05:41 AM in reply to: Simon_Weel

Thanks for sharing back.

Dean Saadallah Blog | Facebook | Google+ | Twitter | PINS
*Expert Elite*
JGerth
Posts: 1,937
Registered: ‎12-05-2005
Message 5 of 5 (1,132 Views)

Re: Mtext change bullet symbol

09-20-2012 07:58 AM in reply to: Simon_Weel

Nice trick Dean, thanks !

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community




Connect with AutoCAD

Twitter

Facebook

Blogs

Pinterest

Youtube