Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

Opening Acad with VBA

Status
Not open for further replies.

mcguirepm

Mechanical
Joined
Oct 9, 2002
Messages
33
Location
US
Does anyone know how to open a specific drawing with VBA? I have a VBA program in Excel that can open AutoCAD 2005, but I can't find the proper command and syntax to open a specific drawing. Everything works fine if I manually open the drawing and then run the macro, but I need it to be fully automatic.

Thanks in advance,
Pat
 
From ACAD VBA

ThisDrawing.Application.Documents.Open "FileName", "ReadOnly boolean"

From VB, set a reference to the the ACADapp.document equal to "ThisDrawing" example above

"Everybody is ignorant, only on different subjects." — Will Rogers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top