Coordinate Import in Autodesk Inventor
Target product: Autodesk Inventor 5.3/6/7/8
Date: 04.04.2004
Download VBA project
Installation
- Run Autodesk Inventor (AI)
- In the Tools menu select Macro
Visual Basic Editor.
- In the Microsoft Visual Basic window select File
Load Project.
- Select the project file ImportCoordinates.ivb.
- Close the Microsoft Visual Basic window.
Running
- In Microsoft Excel open the sheet with point coordinates.
Note Coordinates must be stored so that X coordinates are in one column and
Y coordinates in another column.
- In Autodesk Inventor start a new part file and a new sketch (or leave the
active sketch).
Warning This function requires an active sketch.
If no sketch is active this function will not work.
- In the Tools menu select Macro
Macros.
- In the Macros dialog, in the Macros in list select the All application projects
and Active Documents option.

- In the Macro Name list select the Module1.ImportCoords item.
- Press the Run button.
- In the Point import dialog enter the values depending on the format of your data in the Microsoft Excel sheet (enter the number of column containing X-data, column with Y-data, etc.). The 3D points option imports 3D coordinates as WorkPoints (instead of 2D splines).

For the Sample table use Rows range 2-132
- Run the macro using the OK button.
- After the macro finishes use the View
Zoom All command to display the imported coordinates. They should result in a spline controlled by the values of Excel
coordinates.

Notes
- The Scale factor option converts units without the need to recalculate them in the Excel sheet -
AI works internally in centimeters while most coordinates are read-in in millimeters. This conversion is driven
by the value of 0.1.
- Use the decimal separator as set in your operating system locale - usually a comma (,) in Europe.
- The Close spline option allows to close automatically the created spline.
- Other than the scaling (scale factor) there are no processing performed on the imported coordinates.
The resulting spline is an exact image of the coordinates from Excel - including their order and count.
- Current version has a reference to Excel 2002 XP Object Library. If you are
using a different version of MS Excel (and getting Private oExcel As Excel.Application error - 'Project or Library not found'), you can change your Excel library using the following
procedure:
- Go to Visual Basic Editor
- Select Tools
References
- In the Available references list unselect Missing: Microsoft Excel 10.0 Object Library.
- Select the Microsoft Excel Library according to your installation (either 8.0 or 9.0 or 11.0) - do not select multiple Excel libraries
- Close the References dialog with OK button.
History
1.3 (4.2.2004) |
3D spline option for Inventor 8+, cell value checks, modified defaults |
1.21 (19.11.2003) |
Inventor 8 and Excel 2003 supported |
1.2 (30.7.2003) |
3D points import, tooltips, small fixes |
1.1 (17.5.2003) |
Inventor 7 support |
1.0 (28.5.2002) |
First version |
See http://www.xanadu.cz/apps/importcoord for updates
Copyright © 2004 Xanadu s.r.o. (CAD Studio)