PFM macro loading via PyFlux
Hi All,
I'm trying to load the Create_Lines macro through the PyFlux window:
loadMacro(fileName='C:\Program Files\Altair\2021.1\flux\Extensions\Macros\Macros_Flux3D_Geometry\Create_Lines.PFM')
however, Flux returns:
File C:\Program Files\Altair\2021.1\flux\Extensions\Macros\Macros_Flux3D_Geometry\Create_Lines.PFM\Create_Lines.py not found
Why does it seem that Flux adds a level to the file path ending on .py, and why does this command not work? It seems similar to what I found on the forum.
thanks in advance.
Answers
-
Hello Jelle,
To manually load the macro and check the command you can go in the DATA TREE --> Extensions --> right click on Macros -->Load --> choose the macro --> right click on it in the DATA TREE --> Run. Once the macro is loaded you can find in the PyFlux command (third column at the bottom right of the screen) the command you have to use. Once the macro is loaded you can find in the "PyFlux command" (third column at the bottom right of the screen) the command you have to use.
In the command you used, the slash could be wrong; please, try to use the backslash like here, it should works.
loadMacro(fileName='C:/Program Files/Altair/2022.1/flux/Extensions/Macros/Macros_Flux3D_Geometry/Create_Lines.PFM')
Regards,
Letizia
0