Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro to insert DWG

Status
Not open for further replies.

bpeirson

Structural
Apr 7, 2003
147
I would like to know how to have Excel insert an AutoCAD drawing into a worksheet depending on the part name typed into a reference cell.

I have hundreds of different part numbers/names. I would like the worksheet to be a template to be used for different jobs with different parts for different clients.

Assume that the name of the part will be the file name of the drawing and that all drawings will reside in the same folder.

Thanks in advance for any pointers.
 
Replies continue below

Recommended for you

The only way I think this can be done is to first use a script in AutoCAD to export the image as a metafile or .jpg
then in excel use a VBA cell event to import the image.

Sorry not sraight forward an will require a small amount of both VBA programming and AutoCAD scripting/AutoLISP

 
Another option is to purchase a very inexpensive program called Better WMF from Furix. It works by installing an .arx application file on the AutoCAD directory. From the command line, you type "BWMFOUT", and the program will export a .wmf to where ever you want. The file can then be inserted into Excel. Very good resolution!!!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor