Jump to content

Undocumented Codes for MTEXTs


Michaels

Recommended Posts

Hello,

 

In my codes below, I have a very nice codes that control with Mtext's contents

which are highlighted in red.

 

I looked for the rest but without a result. So anybody have any please ?

 

(vl-load-com)
(setq MyCadDocs (vla-get-activedocument (vlax-get-acad-object)))
(setq pt (getpoint "\n Specify point for text :"))
(vla-put-attachmentpoint (vla-addmtext (vla-get-modelspace MyCadDocs)
         (vlax-3d-point pt)
         0
         "[b][color="red"]{\\C230[/color][/b] Michaels [color="red"][b]\\C5;!}[/b][/color]")
      [b][color="red"] acattachmentpointmiddlecenter[/color][/b])

 

many thanks.

 

Michaels

Link to comment
Share on other sites

Firstly, the acAttachmentPointMiddleCenter is just the enum for vla-put-AttachmentPoint - look it up in the ACAD Dev Help.

 

As for the "{\\C230" etc, these are the dreaded MText formatting codes, and there are a multitude of codes that can appear.

 

Here is a small reference:

 

http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%202010%20User%20Documentation/index.html?url=WS1a9193826455f5ffa23ce210c4a30acaf-63b9.htm,topicNumber=d0e123454

 

Here is another diagram that I constructed for my own reference:

 

http://www.theswamp.org/screens/leemac/Formatting%20Codes.png

Link to comment
Share on other sites

As usual you are always in the front. :)

 

I thought that I would not get any about my thread. but you always breaking the record Lee.

 

Thank you so much.

 

Michaels

Link to comment
Share on other sites

It's a very nice and kind of you to share your own works with the others, I do thank you from my heart.

 

I followed you uploaded Cad help and I found it in mine.:)

 

And the (vla-put-AttachmentPoint) is really great to get use with it from now on .

 

Thank you Lee for your special Help.

 

Michaels.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...