Michaels Posted September 12, 2010 Posted September 12, 2010 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 Quote
Lee Mac Posted September 12, 2010 Posted September 12, 2010 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 Quote
Michaels Posted September 12, 2010 Author Posted September 12, 2010 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 Quote
Michaels Posted September 12, 2010 Author Posted September 12, 2010 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. Quote
Lee Mac Posted September 12, 2010 Posted September 12, 2010 You're welcome Michaels, happy to provide assistance Quote
Recommended Posts
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.