I recently updated the tutorial that shows you how to reorder the specification tree with a CATVBA program. Check out the end result be watching me quickly rearrange the order of the CATIA parts automatically in the video below.
I’ve created an easy to follow, step-by-step tutorial that will show you exactly how to rearrange the order of the components in the specification tree using a VBA macro. My method uses cut and paste but the constraint links will be preserved. In this tutorial, you’ll also learn how to:
create a userform with listboxes, labels, and command buttons
make a listbox not selectable
keep constraints when reordering by cutting and pasting
automatically sort the tree alphabetically, either from A to Z or Z to A
This code reorders components under a CATProduct only, so the first step is you will either need an existing CATProduct to test this on or create a new one from scratch. The general steps this tutorial will follow are:
Create a new CATProduct or open an existing assembly file in CATIA V5