CAD tip # 6606:
Question
Scripts are text files with sequences of AutoCAD commands - the same as if they were typed in manually on the AutoCAD command line.
Let's say we have a simple Excel table with XY coordinates for a spline curve:
In Excel, save (export) this table to a CSV file (comma-separated values format), preferably without the "A" column (point numbers) and without the header - for large tables you can first select and copy/paste the contents of the coordinate-cells to a blank sheet and export this new sheet.Open this .CSV file in notepad and add "SPLINE" as the first line (similarly, you can use PLINE e.g. to draw a graph). Make sure there are no surplus space characters anywhere. You should get something like:
Please note that on some localizations with comma as decimal separator you would need to perfom a replacement: ","¨"." and ";"¨",".Save the resulting file to something.scr. Now just drag and drop this SCR file into your AutoCAD drawing window (or use the SCRIPT command). AutoCAD will draw the spline - just finish the command execution with specifying the missing spline tangents (just press Enter twice). This is the resulting spline curve:
For more advanced import of coordinate geometry from Excel see XLS2Curve.