Tuesday, June 4, 2013

How to count individual parts and display userforms

Many designers are wondering  how to count the number of unique parts in a CATIA assembly (not including instances of a part) with a macro and how to display the result with a VBA user forms. Emmett Ross decided to combine these topics into one tutorial and took it up a notch by making it a dynamic userform as well. This new VBA macro to be run on an assembly to display in a userform:

  • the total number of components
  • the total number of assemblies
  • the total number of parts
  • the total number of UNIQUE parts
 
The next part of the userform is dynamic, meaning its size changes and is dependent on the number of subassemblies in the master assembly. A new label is added to the form for each product which displays their name and the number of child parts for each.
 
Confused? Here's a short video to show how this works (and there's a link to the code in the video's description):
 


Have you ever used a dynamic form before?

No comments:

Post a Comment

I'd love to hear from you!