Archive

Posts Tagged ‘Parameters’

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…

Advertisements

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…

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…