AutoCAD 2013/2014/2015

AutoCAD 2013/2014/2015

Reply
Valued Contributor
84 Posts
5 Kudos
Registered: ‎12-11-2008
Post 1 of 5
Accepted Solution

Mtext change bullet symbol

1710 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

  • 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"

 

*Expert Elite*
24,312 Posts
1,605 Kudos
Registered: ‎11-06-2003
Post 2 of 5

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
84 Posts
5 Kudos
Registered: ‎12-11-2008
Post 3 of 5

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*
24,312 Posts
1,605 Kudos
Registered: ‎11-06-2003
Post 4 of 5

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*
2,273 Posts
312 Kudos
Registered: ‎12-05-2005
Post 5 of 5

Re: Mtext change bullet symbol

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

Nice trick Dean, thanks !

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!