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 MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I envoke an AutoCAD command from VBA

Status
Not open for further replies.

jrice174

Civil/Environmental
Joined
Nov 8, 2004
Messages
129
Location
US
I'm trying to use the AutoCAD BOUNDARY command from within a VBA program. Do I need to use the utility object to do this and if so, how?
 
You can send AutoCAD commands with the SendCommand method. You have to be careful using it though. AutoCAD works at its own speed when executing a SendCommand method and simultaneously, VBA works on its own speed. You need to write your code to account for this.

eg
ThisDrawing.SendCommand "_Circle" & vbCr & "2,2,0" & vbCr & "4" & vbCr
ThisDrawing.SendCommand "_zoom" & vbCr & "a" & vbCr

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

Part and Inventory Search

Sponsor

Back
Top