Hello;
I was wondering if there is any fix or workaround for this issue: When importing a RTF document into an Mtext entity, the formatting of paragraphs that are part of a list are messed up.
Here is what it should look like (screen clip from Word):
Here is what it imports into AutoCad:
If I use Lisp to tweak the Mtext codes, I can get it to look correct in AutoCad:
However, if I open the "fixed" mtext in the Mtext editor, the editor immediately turns it into the incorrect version.
Sincerely;
Michelle
@michellem You need to share actual DWG and RTF files here if you want assistance in understanding what is going on with your own files.
Hello Pendean;
Here they are. Please note the RTF is a small sample of a much larger file - enough to fill 4 sheets of 30x42 paper. The same problem occurs throughout the import of the much larger file.
Michelle
@michellem wrote:...Here they are...
Thanks for the files: your text that is already in the DWG file was created when a test STYLE with a font definition you do not want was active, this one, and that is why you got what you got and it appears you decided to fix by the hard way by manually overriding the FONT
It appears you want to be using ARIAL NARROW for a font, yet none of your 4 text styles have that definition inside the DWG file
So first, in the DWG file, you must have a text STYLE defined with that FONT, then sure it is active BEFORE you start MTEXT and import any text
You always want to preset your TEXTSIZE setting too in the DWG file.
IF... settings in AutoCAD do not really matter to you or any of your colleagues/file recipients, and you only wish to duplicate the content in the RTF file all the time the easy way, then you want to COPY/PASTE from inside your RTF file (MSWORD) to inside the open MTEXT window inside your DWG file.
I'm sorry but the font is not the issue I was concerned about. Since we use an SHX in cad and Word does not support SHX fonts, we always have to fix up the font upon text import. For the files I submitted, I left out the font fixup that we always do.
The issue I have is that the list formatting does not import correctly.
From the RTS file, note the clouded items:
This is how it imports into AutoCad:
It does not matter if I cut/paste the text or use the import text command: the result is the same misalignment.
Since we have to, by executive decision, to import portions of text from the same RTS file for every project we do, it is getting real old, real fast, to have to manually fix up the text each and every time.
Michelle
@michellem wrote:...
This is how it imports into AutoCad:
You'll need to fix these manually on your own inside AutoCAD: MTEXT is a very limited text editor.
@michellem wrote:...Since we use an SHX in cad and Word does not support SHX fonts, we always have to fix up the font upon text import. For the files I submitted, I left out the font fixup that we always do.
You are going to have fun reconciling those two very different text object formatting all the time. no fix.
And yes, MSWORD can...
I've found the width of the mtext entity is critical when trying to get the bulleting to line up properly. Another thing I've noticed is that after I import the RTF I need to scale the entire block of mtext rather than change the text height to keep the formatting from doing strange things.
Hello Jason;
Hmm...So what guidelines should I try on the width setting of Mtext entity?
Michelle
Keep in mind that AutoCAD is not a word processor and editing/formatting large blocks of notes just sucks.
The way I have my RTF file setup (I actually use a DOCX as the main source file then save as an RTF) is each indentation level is setup as a style in Microsoft Word. After I import into AutoCAD (in paper space), and scale the text to get the desired plotted text height, I've found a 7" width works best for my general notes. You may have to also adjust paragraph/gutter spacing if you are using columns in your mtext.
They never import perfectly but the few spots that don't align correctly I can usually just tab them over after importing. I've found this method far easier than trying to get AutoCAD to do anything sensible.
You can see here that things to not always align properly after importing. Now this particular spot isn't setup as a style for indentation but rather has been tabbed to make a "table format". It is these instances that I can usually correct simply by tabbing over a space. The rest of the main indentation levels align properly.
Hello Pendean;
What version of Autocad are you using?
When I select just the "i", "ii" etc paragraphs (and no other paragraphs) and then adjust the two margin settings you indicated, the Mtext editor moves the margin settings for the "a", "b" and "c" along with the selected paragraphs.
I am beginning to think Autocad changed the rules by which the MText editor operates. I seem to dimly recall that the procedure you suggested used to work. However, I have not done a lot of Autocad projects for the last couple of years (Revit projects instead) and now that I am getting more Autocad projects, I have a newer version of Autocad.
I'll see if anyone has an older version of Autocad to test it on.
For SHX fonts, our standard font "Acads.shx" does not appear in the font list when using Word. I also seem to recall reading something 10 or 15 years ago, that Autocad started including TTF font equivalents for their standard out-of-box fonts...which ours is not.
@michellem wrote:....What version of Autocad are you using?...
AutoCAD 2024, but that makes no difference at all, manual editing in MTEXT is vintage-1980s era word processor editing: forget everything you know and use in MSWORD, that does not work here. See attached.
You folks need a new plan to meet the top-dog's edicts: perhaps a purchased add-on can be considered, here is one of many
https://www.dotsoft.com/word2cad.htm
Hmm...I downloaded the file you sent.
Here is the image of the text before any editing:
As soon as I open the text in the text editor, this is what happens:
Does this not happen to you in Autocad 2024?
Michelle
@michellem wrote:...Does this not happen to you in Autocad 2024?
No, sorry. Welcome to MTEXT formatting in AutoCAD
Tried full version Autocad 2020 and full version Autocad 2025 - no joy. Would you happen to be using the Mac version? We are Windows 10.
Michelle
Hello;
An update on this issue. After poking around for about 3 hrs, I think I understand what the MText editor's rules are in this case.
Can't find what you're looking for? Ask the community or share your knowledge.