Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

dynamic link excel spreadsheet into atuocad 1

Status
Not open for further replies.

RussBerg

Structural
Oct 11, 2004
4
How do I setup a dynamic link between excel spreadsheet and autocad and back again?
 
Replies continue below

Recommended for you

You can use GetObject or CreateObject to interact with a VBA-compliant application from within another.

For example, If you wish to access Excel from within AutoCAD, the snippet of code in an AutoCAD module might go something like this...

Dim XL as Object
Set XL=CreateObject("Excel.Application")

Once you have done this Excel will open

Continue with code like...

Dim Wkbk as XL.Workbook
Set Wkbk=XL.Workbooks.Open("C:\MyDocuments\MyWkBk")

and so on...

There's much more to this - but this'll get you started.
Read the VBA help and see the examples therein.


Mala Singh
'Dare to Imagine'
 
Reading your post again, I feel I might have missed your point - if so, my apologies...

Maybe you mean Object linking and embedding (OLE) - the way to do this is to copy from one application and paste it into the other using PasteSpecial with the 'Link' checkbox selected.


Mala Singh
'Dare to Imagine'
 
This is what I would like to do. An engineer makes up a specification sheet in excel about the materials to be used on a job. I would like to have a dynamic link to that spreadsheet in autocad on our cover sheet, however after the cover sheet is made and the engineer changes the spec's, I would like the drawing to check and see if the info is the same, and if not automatically update to the new information.
Then the second thing I would like to accomplish is to take our bill of materials and kick it out to a spreadsheet for an early steel order form. At this point the spec sheet is more important, as this gets frequently overlooked.
 
I recently saw a product of this kind on the net - the link is:
and the name of the product is 'AutoXlsTable'

You can even see an online demo of how it works.

Good luck!


Mala Singh
'Dare to Imagine'
 
However, the PasteSpecial suggestion mentioned in my second post will still work.
1.Select the relevant range in the specs worksheet
2. Hit ctrl+c to copy to clipboard
3. Switch to AutoCAD
4. From the Edit menu item select PasteSpecial
5. In the dialog box that appears select Microsoft Excel Worksheet, make sure the Paste Link checkbox is checked.
6. Click OK to dismiss the dialogbox.

After you have done this, you can resize the embedded range.
Change some values in the worksheet to verify if the changes are reflected in the dwg.

Caution: If you move or rename the workbook the link will break.




Mala Singh
'Dare to Imagine'
 
Thanks for your help the OLE worked w/spec's, we are currently working on extracting attribute text right now for the B.O.M.
 
Glad to be of help - and grateful for your gratitude!!



Mala Singh
'Dare to Imagine'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor