PDA

View Full Version : can i use excel spreadsheets

dooeyy
14th Mar 2003, 08:14 pm
i am running A2000 and am being given lists of points that i need to input. Currently i draw a circle at each point using the coordinates that i am given. This takes a while and is so tedias. Is there a way of attaching an excel spread sheet to draw the points i need.

14th Mar 2003, 09:45 pm
This task is best done with the aid of a LISP routine. If you export the Excel file to a comma delineated format (a plain text file) you could then write a short LISP routine to read the coordinates from the file and draw the circles automatically. It's worth doing if you have to do this task frequently.

fuccaro
17th Mar 2003, 06:47 am
If you are interested in a Lisp routine to do your job please return with more info about the Excel file structure. I anticipate that it will be easy to write the routine. Also it is possible to write a general routine to recognize the data and separate the radius and the coordinates (drawing with hand just the first circle for example). But that request more amount of code. If that is what you need, you should search for a commercial program.

dooeyy
18th Mar 2003, 08:45 pm
i am being given these points from a coodinate measuring machine which can export the coordinates into an excel spread sheet. i have started to read up on how to write a lisp routine but it has been 12 years since i have written one. if you don't use it you lose it. any tips would be very appreciated

thanks

Flores
29th Mar 2003, 10:20 pm
Maybe I can lead you or someone into the right direction to find a solution for your problem. Make a script file out your excel file. If the cordinates in the Excel program have columns "A", "B", "C" for the x, y, z cordinates and the rows are your different points such as:
A B C
1 1 1
2 2 2
3 3 3
4 4 4
5 5 5

You can copy and paste these values into Notepad. This will make it comma-delimited. BUT, ACAD needs the points in comma format, such as when entering the center-point for a circle. In other words it needs to be:
1,1,1
2,2,2
3,3,3
4,4,4
5,5,5

What I simply did was copy and paste the points into Notepad, highlight the spaces between the numbers, and simply hit the comma button to insert the comma.
Now insert the following words above the first set of points:

multiple
circle

The next step would be to put an empty line between each set of points with the Enter button. And the final step is to put a value for the radius of the circles. This will be inserted after the first set of points. For this example we will use a radius of 1 unit. The spaces between the points makes it accept the default radius (which in this example is now 1 unit). That is why only the first set of points need a radius. I guess you could add different radii for different points.

Your Notepad file should now look like this:

multiple
circle
1,1,1
1
2,2,2

3,3,3

4,4,4

5,5,5

Copy the above and make sure there is 2 blank lines below the 5,5,5 and save it in Notepad with a ".scr" file extension (not ".txt"). I'll call this one "circles.scr". Now in ACAD enter "script" at the command line and pick the "circles.scr". After running this script, you will have to hit escape to make it quit. Maybe someone here can shed some light on how to make it quit, or how to make Excel save it in a comma-formatted file.

Flores

Flores
4th Apr 2003, 05:13 am
Is there a way of attaching an excel spread sheet to draw the points i need.
If you have found a lisp solution to do this, could you share it with us?

Flores

gcp310
4th Apr 2003, 06:06 am
try this, its pretty crude, but effective if you want points into autocad fast.

Goodluck
G

djw
13th Sep 2007, 06:13 pm

Got a new one?

SLW210
13th Sep 2007, 06:36 pm
Using LT, you will only be able to use the SCRIPT method. Unless you have an add-on for LT such as LTExtender, etc., you will not be able to run LISP.

djw
14th Sep 2007, 11:17 am