View previous topic :: View next topic |
Author |
Message |
vivek_v SEFI Regulars

Joined: 18 Jun 2013 Posts: 25
|
Posted: Tue Dec 17, 2013 12:01 pm Post subject: Make AutoCAD drawing automatically using excel values |
|
|
I am having an excel value in the cell named raft length and another named raft width. Is there any way in which an automatic drawing can be generated on AutoCAD, showing a rectangle with dimensions equal to raft length x raft width(values from excel cells) when I run some program or macros or anything? |
|
Back to top |
|
 |
sakumar79 ...

Joined: 18 Apr 2008 Posts: 692
|
Posted: Tue Dec 17, 2013 3:35 pm Post subject: |
|
|
Dear Sir,
Yes, you can make use of VBA for scripting a macro in Excel so that it automatically opens Autocad and specifies the commands to generate the rectangle. Alternatively, you can do the VBA scripting in Autocad to read the data from excel file and generate the rectangle. Search for "autocad vba tutorial read excel" and "autocad vba tutorial draw rectangle" for doing it the second way...
Hope that helps
Arunkumar |
|
Back to top |
|
 |
Sampath ...

Joined: 30 Dec 2008 Posts: 71
|
Posted: Thu Dec 19, 2013 3:31 am Post subject: |
|
|
The requirement is quite novel and I have done this several years before using AutoCAD 2008 and VBA.
I will try to locate and post it soon.
Unfortunately current AutoCAD deprecated VBA I guess so my work will not work any more in recent versions.
I wrote a Excel VBA macro and from which I read the cell information and using COM Automation of AutoCAD I drew a parametric drawing.
My framework was such that I proposed an EXCEL scripting so that any end user can write the scrip on Excel cells using cell values as paramters.
This makes any non programmer can achieve AutoCAD programming and that to parametric
Sampath |
|
Back to top |
|
 |
k.sankarasubramanian ...

Joined: 01 May 2011 Posts: 80 Location: chennai
|
Posted: Sat Dec 21, 2013 7:09 am Post subject: Re: Make AutoCAD drawing automatically using excel values |
|
|
vivek_v wrote: | I am having an excel value in the cell named raft length and another named raft width. Is there any way in which an automatic drawing can be generated on AutoCAD, showing a rectangle with dimensions equal to raft length x raft width(values from excel cells) when I run some program or macros or anything? |
Yeah, its possible to prepare a VBA for simple structure. one thing you keep in your mind you have to assign the co-ordinates instead of length, breadth and thickness. In excel make x & Y columns seperately. Then prepare the VBA to execute the Autocad & New sheets. Then line with co-ordinates.
I did this once. I dont have the macros now. Once get i will paste here. |
|
Back to top |
|
 |
someshwar ganti General Sponsor

Joined: 06 Feb 2010 Posts: 74
|
Posted: Thu Dec 26, 2013 2:33 pm Post subject: Re: Make AutoCAD drawing automatically using excel values |
|
|
upload the sample xls file and if possible a sample output file of what u are expecting,
I shall try write a AutoLISP program (subject to my time availability) and post it here
regards
somesh
vivek_v wrote: | I am having an excel value in the cell named raft length and another named raft width. Is there any way in which an automatic drawing can be generated on AutoCAD, showing a rectangle with dimensions equal to raft length x raft width(values from excel cells) when I run some program or macros or anything? |
|
|
Back to top |
|
 |
abhio ...

Joined: 08 Mar 2010 Posts: 530
|
Posted: Fri Dec 27, 2013 2:06 am Post subject: |
|
|
While Lisp and VBA are good for producing dialogs/ functions that work right within the program (VBA is superseded by .Net now), a non-programmer can also get a quick and dirty solution by producing script files from his spreadsheet so as to produce drawings. |
|
Back to top |
|
 |
vinit SEFI Member

Joined: 28 Sep 2012 Posts: 18
|
Posted: Fri Dec 27, 2013 5:03 am Post subject: A similar thing can be done in C# |
|
|
Hi,
I am civil engineer by graduation and software developer by profession. I have done this kind of work in past. I can do it for you as well. You wont even require excel sheet. I would Create a GUI (Graphical User Interface) like every other software, wherein you would put values and the dxf file would be created with all the details you need.
The charges would be very nominal. If you want to get it done, you can get in touch with me at vinit@structwares.com |
|
Back to top |
|
 |
amrita potdar SEFI Regulars

Joined: 04 Sep 2013 Posts: 22
|
Posted: Fri Dec 27, 2013 6:47 am Post subject: |
|
|
hello sir..
i have done these drawings using VB.NET ...
drawings of canal structures,drainage siphons,box culvert, dams..
this is very interesting work...
from excel cell nos.vb.net read that cells and creats drawing in autocad.. |
|
Back to top |
|
 |
syed_A ...


Joined: 22 Oct 2011 Posts: 387 Location: Hyderabad
|
Posted: Fri Dec 27, 2013 11:12 am Post subject: |
|
|
Hello Friend
You can use surfer, but the procedure is as follows
1>Export the Excel file as .csv format
2>change the csv file to .txt format , add in the top total number of lines, for example
you have 100 line, write it as 100,0, then save this file as .bln
3> open surfer, go to map>base map,look for your bln file and open
4>export it as dxf, edit in Autocad ....done
Bye |
|
Back to top |
|
 |
kothavijaykrishna SEFI Member

Joined: 14 Nov 2011 Posts: 9
|
Posted: Fri Dec 27, 2013 4:12 pm Post subject: |
|
|
Hello everyone...
i am really like to know this.where can i get stuff about this, like materials, examples, websites. If anybody knows, plz let me know.
Thank you in advance |
|
Back to top |
|
 |
|