Welcome to the ultimate (and free) CATIA macro programming guide! Check out some of our additional free articles about writing VBA Catia macros. I’ve divided up the content according to your skill level – whether you are brand new to computer programming in general, if you have some experience programming but not in CATIA, or if you’re just looking for real world CATIA macro examples or need help.
Newbies – Brand New to Computer Programming
Programming 101: If you have no computer programming experience read these articles first before you attempt to begin writing your own CATIA macros.
- CATIA Macro Terms and Definitions – What is a macro and why do we use them? Programming terminology to learn.
- CATIA Macro Languages – differences between CATScipt and VBScript
- CATIA Macro Syntax – Learn VBA programming syntax.
CATIA Macro Fundamentals
This section is for those who have coding experience but are brand new to CATIA programming.
- Registering CATIA Libraries
- CATIA VBA Structure
- CATIA Macro Format
- The Product Object Model
- The Selection Object and Search Function
Macro How-to Video Tutorials and Presentations
- Intro to CATIA Macros Video 1: Getting started
- Intro to CATIA Macros Video 2: How to create message and input boxes VBA
- Intro to CATIA Macros Video 3: How to hide all axis systems in CATIA V5
- How to take a screen shot picture using a CATScript macro
- How to count unique parts and create dynamic user forms
- Getting Started with CATIA V5 macros presentation
Advice on Creating Your First Custom CATIA macro
I highly recommend everything read these articles regardless of skill level or experience, especially before swamping my inbox with questions.
- Part 1: Questions to ask before you begin programming
- Part 2: What to do when you get stuck
- Stuck on your first custom macro? Post about it in our forum and someone may be able to help you!
Exercises
“If you tell me I’ll forget, if you show me I may remember, but if you involve me I’ll understand.” I’m putting together some exercises to help you learn how to program in CATIA on your own. Solutions can be downloaded in the Downloads page but I highly encourage you to try and figure out a solution for yourself!
- Search by Name: See if you can write a program to search for geometry by name and center graph on it.
- How to hide geometry: Add on to the search by name code to hide all the geometry selected.
- For more exercises and quizzes, download VB Scripting for CATIA V5.
Projects and Tutorials
- How to model gears: Learn how to create a complex user form to automatically model four different types of gears. NEW!
- Material Yield Optimization tutorial: Use the blank layout optimizer macro to find out what the best orientation is to maximize your material yield. NEW!
- How to reorder the specification tree tutorial: Learn how to create a userform with CATVBA to automatically rearrange parts in a CATProduct
Real-world CATIA Macro Examples
- How to create a new geometrical set within a CATPart macro
- How to add a GSD cylinder to a set of points with a CATScript Macro
- How to automatically publish geometry with a macro example
- How to change units in CATIA automatically
- How to display captures
- Screen Shot Macro
- Switch a Product to Design Mode
- How to find all sketch based features using a CATScript
- Switch CATIA Windows
- CATIA Macro Selection
- Delete Deactivated Features
- Added Properties
- Reorder Spec Tree Macro
- How to computer center of gravity position for parts and products
- Unique part count and dynamic user forms
- Case Study: Roller Coaster Model Macro
- How to measure distance between two points CATIA macro
- How to Open in New Window NEW!
- How to add or remove references NEW!
CATIA V6 Macros
CATIA Drafting Macros
- Drawing View Macro
- Download more drafting macros in the CATIA Macro Pack.
CATIA Jobs Information
- CATIA Job Board
- CATIA Design Engineer Description
- CAD Designer Description
- CATIA NC Programmer Description
- Learning VBA Saved my Career
- Ten Reasons to Build a Website
- Top Four CATIA Skills to Learn
- How to make money with VB Scripting for CATIA V5 – NEW!
Other Useful CATIA Tips and Information
- CATIA UUID
- CATIA Macro SendKeys
- CATIA Errors
- CATIA Macro to Export Data to TXT File
- CATIA Macro to Send Email
- CATIA V5 Tips and Tricks – My non-macro tips.
- How to find the CATIA Automation Help File
If you haven’t started programming macros in CATIA V5 yet, why not? What’s preventing you from getting started?
DOWNLOAD MY TOP TEN MACROS NOW
[polldaddy poll=6587919]
Hi,
Could you please tell me how to create macros by which view names for Isometric,detail,unfolded and section view will be changed in German or any other custom name,in addition to it its scale also in German and underlined and text size 5(Default 3.5).
Hello,
I am curious that if I know partName and I want to retrieve how many milimeters this part move and translation and rotation.I am new and can you tell me basicly?any sample any idea is good for me.
Hi,
I need macro that instance name is equal to part name or instance name to product name (either it is number or letters or any characters) in catia V5. Its very urgent & please do the needful.
Thanks & Regards,
Hemanth
Hi,
i am also looking for the same macro, to rename instance name is equal to part name. please share if you have one.
Thanks
Srini
I really need help with CATIA vba, I can pay as well if someone knows and can help me. I want to know the macro code to export Table in CATIA to export. that all.
Dear,
Im looking for macro which can create point to vector
Hello,
Can you tell us please how to make a macro that opens the active part properties, adds a list of newly defined properties, for example mass, and then it links it automatically with the mass from the active part inertia measure?
Could you please tell me how to create macro for filling part information in title block, by getting information from 3D parameter(Ex: weight or part name or part number extr…).
Hello there, is CatiaScript capable of: the following situation:
– Rename an assembly and it’s components (sub assembly too).
– Replace actual components with the ones from above without breaking any link/association among the components.
Saludos
Hi There,
is there any possibility to remove “list broken links” and “Delete useless elements” from product structure for electrical harness workbench.
Siddu