There are times when you may want to embed an image into an AutoCAD DWG rather than have that image externally referenced (XREF). For example, a client logo that needs to be part of the title block. Normally, the best practice is to create a block object by tracing over the image in AutoCAD and applying hatching as needed. But there are some logos that are not so simple and therefore using an embedded image is preferred.
If you have dragged and dropped the image into the drawing or used the OLE method, you realize that file is being referenced (X-REF) and therefore the separate picture file needs to be included when you send the file to the client. This creates issues when opening files that cannot find the X-REF or when using Autodesk Vault (or other Document management systems) and checking in files.
There are two methods of embedding an image.
Process 1:
- Open the image in a picture viewer in Windows:
- Then using the built in Windows Clipping tool or another capture software (like Snag-it), simply grab what you are looking at (making sure to rotate as needed, since you cannot rotate any OLE objects), then click on the Copy to Clipboard button.
- Now go back to AutoCAD and simply Paste
or CTRL +V (keyboard command) to paste the image into AutoCAD as an embedded OLE object:
Notice, no External Reference was created.
Process 2:
This method to Embed an image into AutoCAD begins with opening the file in an image editor. Since Microsoft Paint is a default application this method requires no additional software installed.
- Begin by opening the image in Paint with either the Open with or Edit commands from a right click menu.
- Once opened in the editor, select some or all of the image to be placed into AutoCAD. This is where you may need to manipulate the rotation or size of the image as necessary (normally worry about the rotation, since you cannot change that on the OLE object in AutoCAD, but you can rescale). Make sure to do these edits before the next step.
- Use CTRL+C or the Copy button to place the partial image or whole image to the internal clipboard.
- Now go back to AutoCAD and simply Paste
or CTRL +V (keyboard command) to paste the image into AutoCAD as an embedded OLE object. Generally this method will give you this dialog box:
Simply click the OK button to close - Once pasted, you will see that no XREF was created, but please note that this process sometimes can reduce the overall quality of the image:
Generally speaking, I use Process 1 almost exclusively. This does increase the file size of your AutoCAD drawing, but sometimes this is preferable to having to send additional XREF’d data. Be aware that the larger the image is that you are embedding, the larger your AutoCAD DWG will get and can lead to performance issues as well.
I almost never use this to embed Excel tables, I prefer to use a Data link, as I have better control over the final object and it’s formatting, but for standard images (like Logos, Stamps, or very specific images, this is a good way to avoid the XREF issues)
Some additional helpful system variables include:
OLEFRAME: Controls whether a frame is displayed and plotted on all OLE objects in the drawing.
0: Frame is not displayed and not plotted
1: Frame is displayed and is plotted
2: Frame is displayed but is not plotted (default)
OLEHIDE: Controls the display and plotting of OLE objects.
0: All OLE objects are visible and plot (default)
1: OLE objects are visible and plot in paper space only
2: OLE objects are visible and plot in model space only
3: No OLE objects are visible or plot
Also refer to this Blog if the embedded OLE objects are not plotting with the correct colors:
https://blogs.rand.com/support/2020/08/ole-objects-plotting-bw-preview-in-color.html
About the Author
Follow on Linkedin More Content by Ryan Wunderlich