AutoCAD font overrides

Here is how to properly override (replace) font’s globally in Autodesk AutoCAD.

Why replace?

Unicode fonts

Depending on your version of AutoCAD the nordic characters for ÅÄÖÆØ might not be working properly. This is usually caused by different versions of the same font’s. For some reason it seems, the characters ÅÄÖÆØ were removed from iso.shx

Fortunately they’re still available in isocp.shx and it’s perfectly fine to replace each font one by one in every drawing. This gets tedious though if you have hundreds of drawings to plot.

Better performance

Another reason might be to get rid of demanding true type fonts commonly used in drawings. If someone uses advanced font’s in drawings this will use up a lot more graphics memory slowing down performance.

demanding fonts

How to replace

Start by locating the file acad.fmp in your AutoCAD support folder. Depending on your version and the user account in Windows this will be stored in different paths.

acad_fmp_path

To quickly find your windows account profile folder you can copy and paste this into the explorer address bar and press enter:

%appdata%\Autodesk\

Check the year release version of Autocad you have installed. Is it 2010, 2014, 2016 or some other year? If you’ve got an AutoCAD subscription you might have several versions installed. If you have 2016 you can copy and paste this into the explorer address bar and press enter:

%appdata%\Autodesk\AutoCAD 2016\R20.1\enu\Support

If you’re hopelessly lost attempting to locate this folder you can use a shortcut built into AutoCAD by clicking File -> Plot Style Manager. This will open the adjacent path where your plot styles are stored.

plot style path

Editing acad.fmp

Before proceeding, once you’ve located acad.fmp make a backup copy of it, just in case. Call it Copy of acad.fmp or something similar.

Open it using Notepad or any other plain text editor. (Not Microsoft Word). Once open it should look something like this:

acad.fmpACAD2016 original: acad.fmp (mirror)

Each new line in this file means one font replacement operation. The syntax for instructing which font to replace is separated by a semicolon ;

The original source font;The font which to replace it with

For example if we want to replace iso with isocp we add the following line. (This is the workaround for nordic characters to work.)

iso;isocp.shx

acad.fmp_edit Edited: acad.fmp (mirror)

For this to have any effect you need to restart AutoCAD completely. All done!

Resource intensive fonts

Consider adding more resource intensive fonts.

And don’t forget the pesky Comic Sans MS! We don’t want that in our drawings do we? 😉

acad.fmp_edit2 Edited 2: acad.fmp (mirror)

End notes

Please keep in mind that replacing font’s will cause external references XREF fonts to change as well. This will cause formatting issues, especially if the new font is larger than the original.

This is important to note in case something goes wrong and you’ve been accidentally messing with someone else’s drawing. To avoid this then restore the original acad.fmp file and restart AutoCAD before plotting.

Advertisements

PDF to DWG hack – Import PDF or EPS vector graphics into AutoCAD using Microsoft Word

Please note! I do not recommend this method any more. Before attempting this hack, instead try using Inkscape ! Full step by step guide here: https://nirklars.wordpress.com/2015/04/22/pdf-to-dwg-using-free-open-source-inkscape/

If you’ve worked in AutoCAD for a time you’ve probably encountered the problem of wanting to import an actual PDF or EPS file into your drawing instead of just making external references. Why is it so messy? And why does it require third party tools to do? And why don’t they do it properly?

One of the excuses you’ll hear is that its a question about accuracy (or lack thereof) and that part is correct. This limitation is down to the accuracy of PDF files. But who is to judge if and when you need accuracy? Sometimes you don’t, it should just work.

Here is an alternative “hacky” way to convert vector graphics from PDF to DWG without third party programs using only Microsoft Office Word. It’s not perfect, but it won’t cost you a dime!

1. Print the PDF to a file

Open your PDF file in your favorite program like Acrobat Reader. Or maybe Sumatra PDF?

print to file

Choose your standard printer. If you don’t have a printer installed a PDF converter of some kind will work as well.
Microsoft XPS Document Writer won’t work unfortunately.

Check the little checkbox next to “Print to file”. Microsoft has a guide as well.

Pressing “Print” won’t print an actual page, it will parse the PDF document, convert it into EPS and instead of sending it to the printer ask you where you wan’t to save it.

After you press “Print” you will be greeted by a very discrete dialog input box. Here you will need to enter the full path and file name of where to store the file.

print to file output name

For example enter: C:\MyFile.eps and click OK.

2. Import the EPS file into an empty Word Document

Open a new empty document using Microsoft Word. Drag and drop the EPS file MyFile.eps into the window to import it.

Save your document and close Word. Example: C:\Dok1.docx

It is important that you choose to save in the *.docx format. This is part of the trick.

3. Rename the *docx document file extension to *.zip

Example: C:\Dok1.zip

rename

If you can’t see any file extensions Microsoft has a guide on how to enable that. Here is another guide with images.

4. Browse the renamed ZIP file and locate image1.wmf

Inside you will find the following content:

cont

This shows you the complete contents of the office open XML document file format.

Browse into \word\media\ and here you will find image1.wmf. Extract this file into a temporary folder.

This is the hacky trick, we utilize Microsoft Word’s internal conversion of EPS to WMF!

5. Import image1.wmf into AutoCAD

The easiest way is to drag and drop the file onto the window. File -> Import also works.

drag drop

6. Correct the scale

Unfortunately the proper scale is lost using this procedure. You have to re-scale the drawing to the proper size. I recommend finding a comparable measurement and using the method scale by reference.

7. [Optional] Explode the block to get lines

8. Compare with the original to make sure that everything went ok.

And there you have it!

Remember that only vector graphics (lines) will be included when importing using this “hacky” method. All solids or raster graphics will be missing. Make sure to carefully scale the imported document!


AutoCAD LT – Layout name and page number diesel expression

Description

These diesel expressions output the variable for the current layout and cuts it at a specified length, this way parts of the name of the layout tab can be inserted into the drawing header:

From this into this!

In this case E63-01_2 is automatically inserted into a drawing header as E63-01 in the name box and 2 in the page number box . DRAWING NAME_PAGENUMBER

Instructions

To create this in your drawing you first need to create two multiline text objects (MTEXT command). Place them where you would like the data to be inserted.

Double click on the MTEXT object and you will see the following toolbar, click on the small button on the top right and select insert field. See image below:

You will find lots of menus and options you can reference here. The data entry for the current layout name is called CTAB and can be located from the dropbox other. In this case we will use a Diesel expression to “chop it up”.

Copy and paste the following into the expression textbox depending on what you wish the MTEXT to display:

DIESEL Expression Code

Single letter page number: $(substr,$(getvar,ctab),$(-,$(strlen,$(getvar,ctab)),0))
Single letter page name: $(substr,$(getvar,ctab),1,$(-,$(strlen, $(getvar,ctab)),3))

Double letter page number: $(substr,$(getvar,ctab),$(-,$(strlen,$(getvar,ctab)),1))
Double letter page name: $(substr,$(getvar,ctab),1,$(-,$(strlen, $(getvar,ctab)),4))

Thats it!