Add a multicolumn MTEXT using VBA or lisp

Add a multicolumn MTEXT using VBA or lisp

Anonymous
Not applicable
1,683 Views
3 Replies
Message 1 of 4

Add a multicolumn MTEXT using VBA or lisp

Anonymous
Not applicable

Hi. 

I want to add some multiline text with 3 columns using visual basic. 

It seems that there is not any attribute or properties for MTEXT object in regards to adding number of columns.

Is this even possible? 

If not, is it possible to add it using lisp? 

0 Likes
1,684 Views
3 Replies
Replies (3)
Message 2 of 4

Ed__Jobe
Mentor
Mentor

You just need to edit the MTEXT using the mtext format codes. To get an idea, create a sample of mtext with some columns in it and then select it an look at it in the Properties palette. Hover over the Contents property as shown below to see the format codes that were used.

 

Edit Mtext.png

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 3 of 4

Anonymous
Not applicable

Unfortunately, mtext format codes do not create columns. Picture below is what I got using format codes. 

If I can find a way to change "column" property of the MTEXT from "None" to "Dynamic", I might be able to use format codes to break text into multi columns. But apparently, there is no code in VBA or Lisp to change this property for MTEXTs. Even changing system variable "MTEXTCOLUMNS" to 1 didn't work. 

 

Mtextcolumns.png

0 Likes
Message 4 of 4

Ed__Jobe
Mentor
Mentor

Sorry about that. I've only used format codes for editing text. I hadn't tested it on columns. The only thing I can think of at this point is to use .NET or if you want to use vba, have an empty mtext entity in a template that has columns set up and then modify its contents.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes