Description
In this lesson you will learn how to import data points from an Excel file in order to create a 3D point cloud in a 3D part sketch.
Notes
A great resource for learning Excel VBA is cpearson.com.
Instead of using CreateObject(“Excel.Application”) you can also use GetObject(“Excel.Application”) to get the most recent Excel process.
If you want to insert 3D curves and not simply a point cloud, you will need to use IModelDoc2::InsertCurveFileBegin, IModelDoc2::InsertCurveFilePoint, and IModelDoc2::InsertCurveFilePoint.
If a residual EXCEL.EXE process exists even after programmatically closing Excel, you can programmatically kill this process using this line of code: Shell “TASKKILL /F /IM Excel.exe”, vbHide