Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Excel data to AutoCAD 1

Status
Not open for further replies.

malakin

Civil/Environmental
May 22, 2001
33
0
0
BS
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?
 
Replies continue below

Recommended for you

Are you inserting lines of commands from the Excel spreadsheet to the command line of AutoCad? In other words are you wanting to insert command lines that will then be executed? I do not understand.
 
Refer to thread555-51546 DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.
 
This works for Microstation. Notice that Microstation is called "ustn". You'll need Windows' internal name for Autocadd but this demonstrates the link:

Sub Export2Microstation()
Dim channel As Long

With Selection
FRow = .Row
RowCt = .Rows.Count
LRow = FRow + RowCt - 1
FCol = .Column
ColCt = .Columns.Count
LCol = FCol + ColCt - 1
End With

task = "PLACE LINE" 'command entry in Microstation
'replace as needed

' keyin is a command to Microstation to use the command entry box.

channel = Application.DDEInitiate("ustn", "keyin")

Application.DDEExecute channel, task
For z = FRow To LRow
Range(Cells(z, FCol), Cells(z, FCol + 1)).Select
If Len(Cells(z, FCol)) = 0 Then
Application.DDEExecute channel, tast
Else
Application.DDEExecute channel, "XY= " & Cells(z, FCol) _
& "," & Cells(z, FCol + 1)
End If
Next

Application.DDETerminate channel
Range(Cells(FRow, FCol), Cells(LRow, FCol + 1)).Select


End Sub
 
lol how hard is it to read another language? other than english lol...

Do you think this is a shareware or freeware?

Has anyone had any luck with program?

does it link up dynamically?

 
If you have full commands in Excel cells you can just copy and paste into Autocad and they will run. You must click on the command line in Autocad or else you will paste the Excel cells into the drawing.
At least this works with Quattro Pro, but I assume its the same.
Oh and it goes row by row if you paste in a 2d range.
 
Status
Not open for further replies.
Back
Top