Creating Elements From An External File

You can create points, curves, and lofted surfaces from a Microsoft ®  Excel spreadsheet containing macros, and in which you define:
 the points space coordinates
the points through which the curves pass
the curves used as profiles for the lofted surface.
Only Excel sheets created with Excel 97 and subsequent versions are supported.
Therefore this capability is available with WindowsTM only.
Open any .CATPart document containing an Open Body (automatically created when entering the Wireframe and Surface Design workbench).
  1. Open the PointSplineLoftFromExcel.xls file from the Samples directory into Excel, and enable the macros.

The document looks like this:

It contains:
instructions, such as StartLoft and EndLoft, StartCurve and EndCurve between which other instructions or numerical data are given. 
numerical data that are point space coordinates: X, Y, Z respectively from the left to the right
a final End instruction

In the above example, a loft is to be created based on three curves. The first and second curve pass through four points, and the third curve passes through five points.

The elements will be created from top to bottom, i.e. the four points of the first curve will be created, then the curve itself, then the points making up the second curve and the latter itself, and so forth.

You can add rows to create more elements or delete rows to edit elements or delete them (point), then save the spreadsheet.

  1. From Excel, select the Tools -> Macro -> Macros menu item.

The Macro dialog box is displayed.

  1. Select the  Feuil1.Main macro and click Run.

The User Info dialog box is displayed.
  1. Key in the type of element to be generated:

1: to generate only the point(s)

2: to generate the points and the curve(s)

3: to generate the points, curves and lofted surface(s)

  1. Click OK.

The elements (points, curves, and lofted surface) are created in the geometry. The specification tree is updated accordingly.

The Wireframe and Surface workbench needs not to be loaded, provided a CATIA session is running and a .CATPart document is loaded.

 

Back Up Next