style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
lyz77 <lyz77@yahoo.com.sg>I
wrote in message
href="news:f0b5f08.-1@WebX.maYIadrTaRb">news:f0b5f08.-1@WebX.maYIadrTaRb...
will like to know is it possible to use visual basic as an interface where
user can enter data using microsoft excel and all the data will be
automatically updated in the autoCAD drawing.
Have anybody try it out before? Please let me know if it is possible and
how this can be accomplish.
Thanks a million!
Regards,
Andy
Have anybody try it
> out before? Please let me know if it is possible and how this can be
> accomplish.
Thanks a million!
Regards,
Andy
I saved this a long time ago. If it worked with LT, it should work with
AutoCAD. Of course, change the "AutoCAD LT.dde" to probably "AutoCAD.dde"
and watch the line wraps.
--begin included message--
Robert Benjamins
Here is a small example of a macro I use.
Sub Macro1()
kanaalnr = Application.DDEInitiate("AutoCAD LT.dde", "system")
x = Worksheets("blad1").Range("B5")
y = Worksheets("blad1").Range("B6")
lengte = Worksheets("blad1").Range("B10")
For L = 715 To lengte - 500 Step 500
Call TEKENGAT(x + L, y + 220)
Call TEKENGAT(x - 55 + L, y + 220)
Call TEKENGAT(x + L, y - 63 + 220)
Next L
Application.DDETerminate kanaalnr
End Sub
Sub TEKENGAT(x, y)
Application.DDEExecute kanaalnr, "[Line " & x - 7 & "," & y - 7 & " " & x +
7 & "," & y + 7 & " ]"
Application.DDEExecute kanaalnr, "[Line " & x - 7 & "," & y + 7 & " " & x +
7 & "," & y - 7 & " ]"
Application.DDEExecute kanaalnr, "[-LAYER S 1 ]"
Application.DDEExecute kanaalnr, "[Line " & x - 10 & "," & y & " " & x + 10
& "," & y & " ]"
Application.DDEExecute kanaalnr, "[Line " & x & "," & y + 10 & " " & x &
"," & y - 10 & " ]"
Application.DDEExecute kanaalnr, "[-LAYER S 0 ]"
End Sub
Indeed, Autocad LT must be running.
I normaly use my macro from Excel when I'm working in Autocad LT.
When Autocad LT isn't running, Excel asks if it should start Autocad. but
that always fails.
--end included message--
Enjoy,
Stef
--
mailto: yodersj@earthlink.net || Drafter, Leather-worker
http://home.earthlink.net/~yodersj/ || Dos, Win, LT
http://www.geocities.com/yodersj/ || Computer How-To
RFC 1855, section 3.1.1, item 10 at http://www.faqs.org/rfcs/
dear sir how to paste excel data in autocad command line using excel macros
This may not be exactly what you require, but it is as easy as copy in excel...paste in autocad
https://www.udemy.com/draw-in-autocad-using-excel-data
AutoCAD is highly compatible with Microsoft Word and Excel. You can insert a Word document into AutoCAD, you can insert an Excel spreadsheet into AutoCAD and you can insert AutoCAD images into Word and Excel. A procedure that is not done very often is inserting AutoCAD images into an Excel spreadsheet, but it is relatively easy.