Exploding Mtext objects with the letter "I" at the beginning of Mtext

Exploding Mtext objects with the letter "I" at the beginning of Mtext

dmadduxjr
Participant Participant
1,092 Views
2 Replies
Message 1 of 3

Exploding Mtext objects with the letter "I" at the beginning of Mtext

dmadduxjr
Participant
Participant

So I have searched for an answer to this problem a lot and haven't found much in the way of answers. When I have a Mtext that is 2 lines long and starts with the letter "I" or a few other characters and you explode it, the insertion point of the top line and bottom line are not aligned. This is only a problem if I change the text back to Mtext and explode it multiple times as it begins shifting to the left which messes with the alignment of my drawing. Unless someone has a solution for this exact problem I was looking for a workaround solution.

 

For instance if I have an Mtext that says "Install this equipment...." I would like to have a lisp that would change the first "I" to say a "M" and then explode the mtext and then change the "M" back to an "I". By changing the first character in this way and then exploding the mtext the top line insertion point matches the bottom line . I have tested to see if it works I just lack the knowledge in AutoLisp to automate the process.

 

Another workaround I imagined is exploding the Mtext and since the insertion point of my second line is in the correct spot. Move the top line insertion point in line with the bottom line's insertion point. Again I don't have the knowledge to implement this in AutoLisp. However, either of these solutions would fix this problem in most cases.

 

Hopefully I explained the problem and solutions so that it makes sense if not I can try and clarify if needed.

0 Likes
Accepted solutions (1)
1,093 Views
2 Replies
Replies (2)
Message 2 of 3

Kent1Cooper
Consultant
Consultant
Accepted solution

That's annoying....  "I" is maybe one of the more obviously-different-result characters, but lower-case "l" is about the same, and others also come out with misalignments to lesser degrees.  Here with a green Line drawn through the second-line-result's insertion point, not only the one above but also the one below  doesn't quite line up:

Misalign.PNG

[I rotated just for the sake of space on the page in the message.]

 

So changing a first character "I" isn't necessarily going to "fix" the problem, because you will still get shifting with other characters, even with "M" a little, though how much seems to vary with the font involved.  But a routine could certainly be made that would align the insertion points of all resulting Text objects, to -- what?  The original Mtext's alignment point?  [And what if it's not in one of the left-side justifications?]  The second line's insertion point, no matter what?  The average  position [in the appropriate direction] of all Text objects resulting from the Exploding?  Something else?

 

One thing you could do is to change the font  of the Text Style involved, or change the Style of the object to one with a different font, temporarily, to something that doesn't have that kind of offset between insertion point and drawn character content, such as SIMPLEX.shx [whose characters look exactly like those in ROMANS, but the latter has that kind of offset] or TXT.shx.  In light trial, it solves that particular problem, and then you can change the font or Style back when you're done.  But  it does risk changing word-wrapping locations....

 

[Of course, the other suggestion is, don't  change back to Mtext and Explode again, and repeat.  I'm curious about why one would have any need to do that.]

Kent Cooper, AIA
0 Likes
Message 3 of 3

dmadduxjr
Participant
Participant

Actually changing the text style seems like a nice simple fix. One that seems pretty obvious now that you mention it.

 

The reason for changing back and forth between text and mtext is that as a standard across the drawings single line text is used in the drawings I work with. As a work around I use mtext to make manipulating the text easier but switch it back to single line text when I am done to stay within the standards of the drawing. I assume that is the standard because we use a template of notes that we copy from and drop into drawings via insertion points and not all drawings have the same notes copied in. So being able to pick and choose and drop in using insertion points is the easier or maybe just the way its always been done.

 

Still not sure how to change the text style of mtext in lisp and explode it, but I feel much more confident finding that somewhere on here than my previous suggestions!!

0 Likes