Update: Download links have been fixed

March 6, 2012 1 comment

Today, the links to the downloads were switched to a new host because of some problems with the previous service that was used. If you tried downloading these files and experienced problems, please try again now. Sorry for any inconvenience this may have caused.

You must be a subscriber in order to access the downloads and learning series content. To sign up now, click here.


Measuring Mass and Inertia

October 27, 2010 27 comments

You have probably used the Inertia measure function in CATIA to get mass and inertia measures but did you know that you can automate those measurements as well?  The inertia object that you may use in your programs works just like the interactive command and provides all the same capabilities you are used to.  In this article, I will show how to program with the inertia object and as usual I will provide sample code and some handy reusable functions. Read more…

Executing CATIA scripts in batch mode

September 26, 2010 22 comments

I got the idea for this article from a reader of this blog.  He sent me an email asking what would be the best way to extract some information from thousands of drawings in an automated way.  That information in his scenario is the value of a handful of parameters that are attached to the root drawing node in each drawing.  I recommended to execute a script in batch mode that would open each drawing one by one and read those parameter values and write the data to a text file.

In our email exchanges, we both agreed that this seemed like a great topic to share with everyone for a few reasons.  First, this is a relatively common scenario so many people could benefit by sharing the code that opens the drawings and writes out the parameter values.  Also, I have a feeling that many have never run a script in batch mode so this article might unlock some new capabilities.  So in this article, I will discuss the basics of running a batch and share the code we developed and tested. Read more…

(Announcement) New Learning Series topic added today – Loops

September 2, 2010 Leave a comment

Just a quick announcement that I added a new topic to the learning series today discussing loops.  This topic discusses important techniques for using loops and includes many example code snippets that you can run in CATIA to practice and better understand the concepts.  Check it out!

  • Understanding the Visual Basic language

Loops <– New topic added today

For more information, visit the Learning Series page.

Working with restricted interfaces

July 29, 2010 9 comments

Often times when coding in VBA, you may get an error message that says, “Function or interface marked as restricted, or the function uses an Automation type not supported in Visual Basic.”  In this article, I will explain the reason for this error and present a good strategy to deal with it. Read more…

Ten compelling reasons to develop your code in VBA

July 10, 2010 10 comments

There certainly are many choices for code development tools at your disposal out there.  Visual Basic is the most popular language for CATIA automation programming but it has many flavors such as VBScript, VBA, VB6 and VB.NET and each has its own development environment / editing tools.  I use all of these tools at different times depending on the requirements of the project I am developing.  However, I find that I almost always tend to do a lot of the code development in VBA even if the final code ends up in a different environment such as VB.NET.

While I have found VBA to be a very efficient tool to develop my code, I have noticed that a lot of people are still developing their programs as scripts in the macro editor that is built into CATIA or some other form of simple text editor.  While this works well enough for a very short and sweet macro, as the length and complexity of your program grows, these tools really become terribly inefficient.  In this article, I am going to going to point out some features that I find very useful in the CATIA VBA editor and that I think will make your life a whole lot easier if you are one of those people who still spends most of their time in the CATIA macro editor.  Even if you are already familiar with VBA, skim through and maybe you can pick up a few tricks. Read more…

(Announcement) New Learning Series topic added today – Arrays

June 24, 2010 Leave a comment

Just a quick announcement that I added a new topic to the learning series today discussing arrays.  Check it out!

  • Understanding the Visual Basic language

Arrays <– New topic added today

  • General programming principles
  • Understanding the CATIA object model

For more information, visit the Learning Series page.

(Announcement) Learning series started today

June 14, 2010 Leave a comment

Welcome to a series of articles aimed at transforming those who are new or inexperienced CATIA V5 automation programmers into very proficient ones.  There are a lot of people out there who want to learn how to program CATIA V5 but never do because it they are so busy with their primary job role which is typically an engineer or designer not a programmer.  They can see the incredible power that this knowledge can bring but are busy with the day to day grind and just can’t dedicate a large block of time to learn it.

The intent of this series is to walk you through the important things one step at a time.  I am not going to cover everything you need to know by any means.  Instead, I will take you on a quick tour and point out what I think are some of the important things then show you where you can go to learn more.  If you want to go further, it’s up to you to explore a bit on your own.  My goal with this is just to introduce a lot of fundamentals and point you in the right direction to do some self learning.

Each new topic will fit into one of the three chapters listed below:

  • Understanding the Visual Basic language

Data types (First topic posted today)

  • General programming principles
  • Understanding the CATIA object model

For more information, visit the Learning Series page.

Developing proper names to use in product relations

May 24, 2010 5 comments

Developing proper names to use in product relations

In the last article, I introduced some scenarios where you need to develop the proper name of an object to use in a part relation. This article follows up by discussing some other scenarios where the relation is created in a product and refers to various objects in both parts and products. Read more…

Developing proper names to use in part relations

May 11, 2010 3 comments

There are times when you may need to create a relation (formula, rule, law, etc.) using automation.  CATIA refers to parameters, geometry and other objects inside those relations based on their name so to accomplish this you will need to understand how to develop those names properly.  There are many different ways to express the name of an object inside a relation depending on where the relation is located and where the object it is referring to is located.  In this article, I will cover how to develop names of objects inside a part when the relation is also created in the same part. Read more…