malakin
Civil/Environmental
- May 22, 2001
- 33
I am looking to produce profiles, cross sections etc in AutoCAD by inserting a line of commands from an excel spreadsheet. How exactly is it done?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Sub RunAutoCADCommands()
Dim iRow As Long
Dim sCmd As String
'Connect to AutoCAD
Dim cadApp As Object
Dim cadDoc As Object
Set cadApp = GetObject(, "AutoCAD.Application")
Set cadDoc = cadApp.ActiveDocument
'Issue Commands
iRow = 1
Do While Range("A" & iRow) <> ""
cadDoc.SendCommand (Range("A" & iRow))
iRow = iRow + 1
Loop
'Done
MsgBox "Done Processing Commands"
Set cadDoc = Nothing
Set cadApp = Nothing
End Sub
Private Sub CommandButton1_Click()
End Sub