🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

PFM macro loading via PyFlux

User: "Jelle_20634"
Altair Community Member
Updated by Jelle_20634

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.

Find more posts tagged with

Sort by:
1 - 1 of 11
    User: "Letizia_Ferrara"
    Altair Employee
    Updated by Letizia_Ferrara

    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