A macro launcher for CATIA V5, designed to make running and registering macros as effortless as possible. Catryx automatically scans JSON configuration files in a designated folder and dynamically builds an organized menu UI, so you can launch your macros intuitively.
This tool was created to address the limitations of the existing CATIA_V5_SimpleMacroMenu. The previous macro menu had several pain points:
- Environment compatibility issues: It relied on older .NET Framework objects, causing failures on recent systems.
- Bloated source code: All functionality was packed into a single
.catvbafile, making the project unwieldy and hard to maintain. - Tedious configuration: Adding and registering existing macros was overly cumbersome.
Catryx solves these problems by providing a launcher that is free of external library dependencies and supports splitting macro projects into simple, manageable units.
- Distributed management: Organize macros into separate folders to keep codebases clean and maintainable.
- Dynamic UI generation: Simply place folders and JSON files in the specified structure, and tabs and buttons are generated automatically.
- Icon support: Drop an image file (jpg / bmp / gif / ico, etc.) into a macro's folder, and it will automatically be used as the button icon. (Note: png is not supported due to VBA's built-in limitations.)
- OS: Windows 11
- CATIA V5 V5-6R2022 (R32)
Register Catryx.catvba just like any other CATIA macro:
- Download this repository and place it in any location you prefer.
- Open the CATIA Macro dialog (
Alt + F8) and registerCatryx.catvba. - Run the
CATMainsubroutine inMain.basto launch the launcher.
Below is the basic file/folder structure required to run the launcher.
Place a Macros folder at the same level as the .catvba file, and the launcher will scan it automatically.
(your-folder)/
├── Catryx.catvba <- The launcher itself (contains Main.bas, etc.)
├── Macros/ <- Root folder for all macros you want to run
│ ├── Settings.json <- Global launcher settings (e.g. tab order; auto-generated)
│ │
│ ├── [MacroA_folder]/
│ │ ├── xxx.catvba <- The macro to execute
│ │ ├── icon.png <- (Optional) Icon image displayed on the button
│ │ └── Macro.json <- Macro registration info (group, entry point, etc.)
│ │
│ └── [MacroB_folder]/
│ ├── yyy.catvba
│ ├── icon.jpg
│ └── Macro.json
This file is auto-generated on the first launch. It primarily controls the display order of tabs (groups) in the UI.
{
"tabOrder": [
"Part",
"Assy",
"Draw"
]
}tabOrder: Lists tab names in the order they should appear from left to right. Any groups not listed here will be appended automatically to the right.
Place this file inside each macro's folder to define which module and function to call.
{
"group": "Part",
"moduleName": "Main",
"functionName": "CATMain",
"tooltip": "A handy utility macro for parts",
"Caption": "MyMacro"
}group(required): The tab category name. Use a comma-separated value (e.g."Parts, Utility") to display the same button on multiple tabs. Macros without this field are not loaded.moduleName(optional): The standard module containing the target macro. (Default:"Main")functionName(optional): The procedure to call. (Default:"CATMain")tooltip(optional): A description shown when hovering over the button.Caption(optional): The text displayed on the button. If an icon image is present, the icon takes priority; otherwise this text is shown. (If omitted, the first two characters of the file name are used.)
You only need to specify group — all other keys fall back to their defaults.
{
"group": "Part"
}In this case, the CATMain procedure in the Main module will be called.
The launcher UI automatically includes a Preferences tab alongside your macro tabs. It provides the following buttons:
- Open Macros Folder: Opens the
Macrosfolder in File Explorer — handy for adding new macros or editing configuration files. - Reload: Re-scans the
Macrosfolder andSettings.json, then rebuilds the UI to reflect the latest state. This lets you pick up changes without restarting the launcher.
Contributions, bug reports, and feature requests are welcome! Feel free to open an issue or submit a pull request.
This project is licensed under the MIT License — see the LICENSE file for details.
