Two methods to check geometry types

January 11, 2010 13 comments

In this article, I am going to discuss two different methods to interrogate a geometrical feature and understand what type of geometry it is.  By type of geometry I mean point, surface, line, solid and so on.  This is different from the automation object type that you would get from using the Visual Basic TypeName function, which I discussed in a previous article.
Read more…


Easily display array values in a Msgbox for debugging

January 4, 2010 6 comments

Happy New Year!  I hope you enjoyed some time off with family and friends for the holidays.  From time to time, I will post some shorter topics that are more like quick tips than full articles.  I figured everyone is just getting back to work this week and probably has a lot going on so this is a good time for a short and simple topic.  In this article, I will show a simple way to display array values in MsgBox.  This is a very handy debugging tool I sometimes use when I need to check array values as a program is running.  And best of all, it only requires one line of code.
Read more…

How to get the Part object from virtually any object within it

December 15, 2009 4 comments

Sometimes I run into a situation where I have a variable that refers to some object inside a part and somehow I need to need to get at the part that the object exists in.  Here, I will show an easy way to get the part object from virtually any other child object in that part.
Read more…

A comparison of two methods for deleting objects

December 7, 2009 5 comments

In this article, I am going to discuss two different methods for deleting objects using automation.  The first method is provided by the selection object.  This process is very similar to the way you delete things when you use CATIA interactively – you select the items to delete then click delete.  The other method I will show is provided by the HybridShapeFactory object and is a bit more specialized but can be very handy (and even required) in some situations.
Read more…

Checking data types at runtime

December 2, 2009 12 comments

In this article, I will show a simple way to check any data type using the Visual Basic language.  If you don’t already know how to check data types, I think this article will prove to be very useful for you.  I use this technique very often when I write code and I suspect you will as well.
Read more…