If you have ever tried to place more than 1 point using the coordinate option in CATIA, it becomes apparent very quickly that it can be a very tedious task. Often, users trying to create surfaces need to be able to place points for their curves to be placed on. Having to type in an X, Y, and Z coordinate for each and every point for more than just a couple of points at a time will take forever. If the goal is to create an array of points to create curves to pass through, there is a “Hidden” function that can speed up the job for us.
When CATIA is installed, buried within its install directory is an Excel file whose purpose is to help streamline the process of placing points into CATIA. The name of this file is GSD_PointsSplineLoftFromExcel.xls and inside this file are Macros to allow users these 3 options:
- Create as many points as they want by just typing out X,Y and Z coordinates into formatted Excel columns.
- After the points are created you are given the option to create Splines that pass through those points in the order they were created.
- If more than one Spline was created, the user can decide if they want a Multi Section Surface to be built, blending all of the curves together.
All these choices are made and implemented using the Excel file.
Let me step you through the process. Or if you'd prefer to watch a demo of this, view my video here explaining the process.
1. The first and hardest step in this process is just finding the Excel file. CATIA can be custom installed and it can change the location of where some files show up. However, if CATIA was installed with the default directory you will be able to find the file by navigating through the path below.
C:\Program Files\Dassault Systemes\B25\win_b64\code\command
B25 is the build or version of CATIA that is installed so yours may differ depending on the revision of CATIA you are working with.
2. Within the command folder you will be able to find the Excel file called GSD_PointsSplineLoftFromExcel.xls. Double click on it to open the file.
3. When open, the security settings in Excel will tell you that macros have been disabled. To use this function, you will need to click on the Enable Content button to allow the macros to work.
4. The formatting of the Excel file is very important. By default, the document is setup to crate 3 different splines using 4 to 5 points each. We are able to edit this file by editing this information.
5. Spline 1 is displayed as the yellow box for clarification. All of the rows between the StartCurve and EndCurve represent the points being used to build that curve. By inserting more rows, you will be able to add more points to the spline.
6. The columns are organized by X, Y and Z coordinates. Edit these values to be able to create your own custom points.
7. The StartLoft and EndLoft rows collect all of the Splines that will be used to create the Multi Section Surface if you chose to create one.
8. Before being able to run this Macros inside GSD_PointsSplineLoftFromExcel.xls, you will need to have CATIA running and have the part file open that you want to place this geometry into. Trying to run the macros and not having the CATIA file ready to go will cause Excel to prompt the user with error messages.
9. Now we are ready to run the macros. At the top of the Excel window select the View, then select the Macros button.
10. When the Macros window appears, you will see 4 different macros to choose from. The Main macro will control all 3 of the other macros through its options. Select Main and Click Run.
11. The User Info window comes up giving the user the ability to choose 1, 2 or 3. Typing 1 and clicking OK will just create all the points in the Excel list. Typing 2 would create the points and create splines through those points based on how it is laid out. Typing 3 would create the Points, Lines and a Multi Section Surface out of those Splines. Once you select 'OK' the macro will run in the background and you will be able to view the results within the CATIA part file.
Example of (1) Points
Example of (2) Points and Splines
Example of (3) Points, Splines, and Multi Section Surface.
To hear more CATIA tips and tricks, take one of our training classes! This tip is covered in the Rand 3D class: CATIA V5: Advanced Surface Design.
www.Rand3D.com
I´ve been using that macro with a naca airfoil but the splines don´t pass through the points exactly, just use the points approximately. And I´m using 3d accuracy set to 0.01, so it´s not a visualize error. How could I make pass the splines through the points exactly?. Thanks!
Posted by: Velow | 11/12/2018 at 07:52 AM
It can be a little difficult to trouble shoot without being able to see your exact example, however I think you are on the right track by looking into a Visualization Error. While 3D Accuracy should be set to 0.01. You will also want to check the "Curves' accuracy ratio" and set it to 0.10. This will decrease the sag value for curves even more and should improve the look of the surface to better match the splines. This setting is found right under 3D Accuracy and is controlled with a slider. Start with that and see if it resolves your issues.
Regards
Mark
Posted by: Mark | 11/23/2018 at 02:33 PM
Thanks for the tip. Excellent.
Don't have a use for it at this time, but nonetheless it's always good to know there are alternatives.
Posted by: Wazir Samsair | 07/30/2019 at 09:17 AM