Creating Multiple Points in CATIA V5 using Microsoft Excel

I get asked time and time again if there is an easier way to input multiple points into CATIA V5. The answer in short is, yes there is! Furthermore the functionality is available with every install on CATIA V5 and is right under your nose.

 
So how does it work?

Within the installation directory of CATIA V5 lurks a Microsoft Excel file which contains some fancy macros pre-configured for you. The file itself is called:

“GSD_PointSplineLoftFromExcel.xls”

And can be found (for a typical Windows 7 64-bit installation) in:

“C:\Program Files\Dassault Systemes\B26\win_b64\code\command”

By default the spreadsheet looks something like this:

Creating multiple points in CATIA V5 using Microsoft Excel 1  

When you run the Macro from within Excel, it reads the data from “Sheet1” and then creates the geometry directly into a new Geometrical Set inside CATIA V5. CATIA V5 must be open with a part file open (new or existing). The Data itself can be inputted to a manner to be able to create multiple points, multiple splines and/or a Multi-Section Surface (Loft). This is how the spreadsheet is broken down:

Creating multiple points in CATIA V5 using Microsoft Excel 2

We can choose to input multiple points as illustrated above. By Specifying points between a “StartCurve” and “EndCurve” field, we can create a spline connecting the points as illustrated below:

Creating multiple points in CATIA V5 using Microsoft Excel 3

Finally we can create a Multi-Section Surface (Loft) using the Splines as illustrated below. The loft is created between the “StartLoft” and “EndLoft” fields. The “End” field specifies end of points/splines/loft:

Creating multiple points in CATIA V5 using Microsoft Excel 4

The user can manipulate this data so that additional points can be added or more/less splines etc. The columns are identified as [X,Y,Z] coordinates as described below where Yellow is X, Green is Y and Blue is Z:

Creating multiple points in CATIA V5 using Microsoft Excel 5

The example below is of an Aerofoil where multiple points are created to define the aerofoil profile (Spline) at both extremities of the aerofoil. There is then a Multi-Section Surface (Loft) between the two Splines:

Creating multiple points in CATIA V5 using Microsoft Excel 6 

 
How to use this functionality

1. Browse to and open GSD_PointSplineLoftFromExcel.xls (Typically in C:\Program Files\Dassault Systemes\BXX\win_b64\code\command)
 

2. Display the Developer Tab in Excel to access Macros easily:

Creating multiple points in CATIA V5 using Microsoft Excel 7


3. Modify the data in Sheet1 as required:

Creating multiple points in CATIA V5 using Microsoft Excel 8

4. Ensure a new/existing part is open in CATIA V5:

Creating multiple points in CATIA V5 using Microsoft Excel 9

5. Run the macro from the developer tab:

Creating multiple points in CATIA V5 using Microsoft Excel 10

6. Run the macro labelled Feuil1.Main:

Creating multiple points in CATIA V5 using Microsoft Excel 11

7. Enter value 1, 2 or 3 depending on the output required and press ok:

Creating multiple points in CATIA V5 using Microsoft Excel 12

8. Check your CATIA V5 part file (Value 3 was used in step 7 for this example):

Creating multiple points in CATIA V5 using Microsoft Excel 13

 
Alternatively watch the video below:


Problems with the Macro?
If you are having problems with the macro in Microsoft Excel and getting the error “Object doesn’t support this property or method”, please try the fix below.

Using this Excel based macro as an example, when running the macro the user is issued with the following warning:

Creating multiple points in CATIA V5 using Microsoft Excel 14

To rectify this issue, the user must open up the VBA editor in Microsoft Excel by pressing Alt+F11 or Selecting Visual Basic in the Code ribbon under the Developer Tab:

Creating multiple points in CATIA V5 using Microsoft Excel 15


With Visual Basic now open from inside Excel, look for the line:

Set MyPart = CATIA.ActiveEditor.ActiveObject

And replace it with the following line:

Set MyPart = CATIA.ActiveDocument.Part