When creating macros, the next reference them in CATIA, to reference it must first create a folder for storing such Macros.
Then Tools > Macro > Macros …
In the pull-down tab is selected Directories
Then select «Add Existing Library …”
We select the folder where are our Macros, they are automatically displayed in the middle window when the directory is selected:
You can close the directory is referenced in CATIA.