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.