The following is an excerpt from a visual basic program
that reads data from the worksheet and plots it in AutoCad.
It assumes AutoCad is running when it is launched. Before
anything happens, I get an error message such as "cannot
find Autocad..exe. Load now? y/n" Does anybody know what
the eauivalent DDE initiate line is in NT and ACAD13????
Sub DrawNodes()
ichannel = Application.DDEInitiate("AUTOCAD.DDE", "System")
While Not((IsEmpty(Worksheets("Node_Map").Cells(irow, 2).Value)))
x = Worksheets("Node_Map").Cells(irow, 2).Value
y = Worksheets("Node_Map").Cells(irow, 3).Value
z = Worksheets("Node_Map").Cells(irow, 4).Value
cmd = "[Point "&CStr(x)&","&CStr(y)&","&CStr(z)&Chr(10)& "]"
Application.DDEExecute ichannel, cmd
irow = irow + 1
Wend
End Sub
In R13, the DDE topic name is "AutoCAD.r13.DDE|System"
There is NO documentation on this subject. At least, none that I could
find. You have to dig for it...... :(
Paul Taylor, Computer Services Manager
WSP Consulting Engineers, Tadworth, Surrey, UK.
Thanks for the advice. The syntax of the initiation line for Excel
Visual Basic macro (Office 95 running on NT, Acad 13.c3) is:
ichannel = Application.DDEInitiate("AUTOCAD.r13.DDE", "System")
This worked like a charm.