Author Topic: AutoCAD Title Block from EXCEL VBA  (Read 210 times)

0 Members and 1 Guest are viewing this topic.

JGupte

  • Mosquito
  • Posts: 1
AutoCAD Title Block from EXCEL VBA
« on: August 20, 2017, 10:12:32 pm »
Hi All,

I am trying to write a VBA script that will run from inside an Excel spread sheet to update the title block fields from values in the spreadsheet.

I have been able to use ATTOUT to export the existing values to a TXT file and ATTIN to import the changed values. But I need to drive this from Excel VBA.
In plain English, what I need to do is:

Loop through all dwg files in a list
for each dwg file,
     find the Title block values in my spread sheet and export them to a txt file (in the correct format)
     open the dwg file
     import the txt file (ATTIN)
     save and close the dwg file
     Delete the txt file
Loop

I am fairly proficient in Excel VBA, but not in AutoCAD.
So far, I can create a link to AutoCAD and open the dwg file, then save and close it.

But I can't figure out how to automate the ATTIN function.

As I am not a Administrator on my PC (company policy) I can not install any programs of tools.

Any help would be appreciated.

JG


BIGAL

  • Newt
  • Posts: 91
  • 30 + years of using Autocad
Re: AutoCAD Title Block from EXCEL VBA
« Reply #1 on: August 21, 2017, 12:42:23 am »
Check your post at Cadtutor also.
A man who never made a mistake never made anything