Deploying your macros and programs

March 14, 2010 29 comments

There are numerous ways to deploy your various CATIA macros and VBA projects to a larger group of users.  It is possible to create custom toolbars, use macro libraries or even execute them from a file folder.  After experimenting over the years with different methods, I have found that using a catalog works very well.  In this article, I will first discuss some issues associated with using some of those other methods then I’ll discuss the catalog option. Read more…

Advertisements

Efficiently navigating parameter collections

March 4, 2010 8 comments

Many times over the years, I have seen a common problem posted in CATIA forums.  The problem is that some macro runs great on smaller parts or products, but it slows down tremendously on larger ones.  The programmer has noticed that the slowness happens when trying to retrieve a parameter from a parameters collection.  Fortunately, the problem is very easy to correct.  In this article I will show how to work with smaller parameter collections to boost performance and also show how to more reliably get at the specific parameters you need. Read more…

VBA userform display techniques

February 24, 2010 8 comments

First off, the website improvement survey results have been steadily coming in over the last two weeks.  If you were one of the survey participants, thank you very much!  So far I am getting a lot of good information and using it to plan upcoming topics.

One subject area where many people have shown interest is VBA userforms (I will just call them forms).  Adding forms to your CATIA programming project can really enhance it and provide a better experience for the end users. So in this article, I will cover some techniques for displaying, hiding and closing forms.  I’ll discuss a few of the common things you might encounter and how to handle them. Read more…

(Announcement) Please help improve this site!

February 10, 2010 Leave a comment

Wow!  It’s been a little over two months since I started this blog.  To get the ball rolling I have been posting topics that either I think are interesting or that many people would find useful.  More and more though, I have been wondering what topics are best to write about in the future.  I have so many topic ideas, but realized why not reverse the process and just let you tell me what you want to read.  Seems logical, so let’s try it. Read more…

Using file open and save dialogs

February 8, 2010 12 comments

Many programming projects require the user of the program to specify either a file to open or save.  That file could be anything from a native CATIA file such as a CATPart or CATDrawing to a simple text file.  Luckily, the CATIA automation API provides methods to display familiar file dialogs just like those you see in any other Windows application.  In this article I will show how easy they are to incorporate into your programming project and also how to deal with some common file related issues. Read more…

Generating code with Insert Object Resolution

January 27, 2010 9 comments

You are probably already aware that you can record macros in CATIA V5 much like you can in Microsoft Office and other softwares.  Recording macros is very simple, so I’m not going to discuss in detail how to do it in this article other than to direct you to the “Tools-Macros” pull down menu.  What I will discuss in this article is another related tool called Insert Object Resolution (I will refer to it as IOR) that you can also use to generate code.  I will discuss how to use IOR and show how it complements the recording capability. Read more…

How to use the StartCommand method

January 20, 2010 19 comments

In this article I will show how to launch almost any interactive CATIA command from your code.  I sometimes use this method when the command I need to use in my program is not exposed through an automation API.  There are also some rare situations where it might be useful to launch the actual interactive command from your program.  This allows the user to interact with the familiar CATIA dialogs to complete some task, but I will point out a potential problem that will depend on the command and your program flow. Read more…