Release Info on V1.4:
- made the form resizeable, although a minimum width is defined
- with a 'Graph Tree Reordering' - Dialog already opened, further read attempts caused an error; changed
- check, if Assembly Workbench activ
- check, if part or product was selected
- handled some possible user errors
- until V1.3 the Catia interface language had to be English for the macro to work; now German, French and Italian also work
- Bugfix: Part/instance names with a '.' would crash the macro
- Requirement for products: Instancename = Partname + Index
- ApplyWorkMode DEFAULT_MODE for all products; Effect: Reading the products list takes longer
Usage remains as described for Version 1.3.
This is what the dialog looks like:
Notes:
ComboBox for the Catia Interface Language:
The macro attempts to determine Catia's interface language. If for some reason the answer is incorrect, the language can be adjusted manually by selecting the correct entry from the combo box.
Error message: 'Part name and instance name don't match':
This indicates, that there is a difference between P/N and Inst/N, eg:
- P/N: SUBASSY__817__PLATTE_GESCHRAUBT
- Inst/N: 12B01BB__817__PLATTE.5
The macro will only work with properly synchronized products.
Macros to automatically sync products can be found here:
- InstanceEqualName - Match Instance Name with PartNumber
- InstEqNameOneLevel - Sync Child Instances Of A Product
The zip(exe and source code) is further down in this article.
Release Info on V1.3:
- dumped the '-c' parm; introduced two sort options instead;
- removed the delay from code and dialog; now writing back the sorting order is much faster;
This is what the dialog looks like:
Release Info on V1.2:
Bug: Products w/o instance designator, eg. 'APart' instead of 'APart.1', crashed the program. Fixed.
New: ProdSort now accepts a parm '-c' (case insensitive).
Effect: Without parameter V1.2 sorts 'Z' before 'a'. If '-c' is set, 'a' will be sorted before 'Z'.
This thread here discusses the automated sorting of a product.
The download contains the VB6 .exe as well as the vb6 source code.
In order to play with the source you will also need Dbgwproc.dll.
For further infos check the .zip.
How to use:
- Start the .exe from explorer
- Start ProdSort
- in Catia open the 'Graph Tree Reordering' dialog; select a product
- in ProdSort select 'Read List' -> the products are read from Catia into the ProdSort list
- in ProdSort click 'Sort' -> the products are sorted alpha-numerically
- re-adjust the liist entries as you wish; select a product from the list and use the Up-Down-buttons
- Click 'Write back' to sort the products in Catia according to the ProdSort list
- in Catia click 'Apply' or 'OK' to accept the new sort order
- Start the macro within Catia by clicking an icon
- in Catia click the icon to start the macro
- then start 'Graph Tree Reordering'
- alles weitere wie unter 1.
The macro sorts the products within Catia by mimicking the neccessary keypresses in the 'Graph Tree Reordering' dialog.
Jumping from one list entry to the next within 'Graph Tree Reordering' Dialog takes time.
In order to give Catia enough time to react, the macro waits after each keypress.
This delay is calculated depending upon the the number of products, but may be set by hand using 'Set delay'.
The displayed value is the sum of all delays (4 per product).
The calculated value is 10ms per product + 1s, therefore the default delay is never less than one second.
Entering too small delay values will result in sorting errors.