CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products []
Cesky English Deutsch
 Visitors: 1976 

CAD tip CAD tip # 12120:

Question CAD 
 %  platform  category 
Q - question

Double-click to edit raster images in DWG drawings.

A - answer With a simple utility and a small edit of your menu you can edit raster images attached to your DWG files - directly from AutoCAD.

The standard function assigned to double-click on a raster image is IMAGEADJUST. But you can change it right to launching a raster editor of your preference - e.g. PhotoShop, CorelPAINT, IrfanView, Paint, etc.

The first assumption is the freeware LISP utility ImgEdit - download it from and drag it to the briefcase icon in the dialog of the APPLOAD command - this will ensure it will be loaded in every DWG drawing. This utility defines the command IMGEDIT, which we will use in the menu.

Run the CUI command and in the left bottom pane create a new command "ImgEdit" and assign the macro ^C^CIMGEDIT to it. Then drag this new command up to the tree branch "Double-click actions > Image". Confirm the dialog with OK.

Then just double-click on any image attached with IMAGEATTACH in your AutoCAD session. This will automatically launch the graphic application associated in Windows with the given type of raster image (IrfanView in our case) and unloads (frees) the image for editing. Then save the edited image in your image editor and exit the application. AutoCAD will automatically reload the edited image back to the drawing.

See the usage in action (click for larger):

You can modify the LISP file to launch a predefined graphics app. The mechanism used in this LISP application can be also used for similar tasks requiring to start an external .EXE application and wait for its completion.

100% *  CAD 
22.1.2019    1382×  

See also:
Tip 12609:Dynamo - how to convert a raster photo to 3D model in Revit?
Tip 12365:How to show color print (sketch) also on the sheetmetal flat pattern?
Tip 12361:Seamlessly connected images by irregular clipping in AutoCAD (or LT).
Tip 12214:How to set bitmap transparency in an Inventor drawing.
Tip 11790:How to get a hi-res image of an Inventor assembly (for a brochure, billboard...)?

Back   All CAD Tips All CAD tips&tricks

Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD:    OS:    Categ: 
Text:  FAQ glossary   

Track your time spent working on AutoCAD or Revit jobs - automatically with
CADstudio JobTime More info

Please use these tips at your own risk.
CAD Studio is not responsible for possible problems that may occur as a result of using any of these tips.