Parameters of a macro

Romain B
Romain B Altair Community Member
edited October 2020 in Community Q&A

Hi,

 

I'd like to know if there is a way to let the user give parameters to a macro without those parameters being Flux parameters (IO or geometric).

Simple example: I want to make a macro that computes the parameters of a non-meshed coil. The user can enter the dimensions of the iron core as well as the maximal size of the coil and the thickness of the insulation. Yet, I do not want these input values to be saved as geometric parameters, I only want to keep the four resulting values as parameters that Flux needs. Can I do this?

 

Thanks in advance,

Romain

Tagged:

Answers

  • Yann_Le_Floch
    Yann_Le_Floch
    Altair Employee
    edited November 2017

    Hi,

    If I well understand your question, you can use input like that :

     

    '''@param NbMaxIterParam      I04                          1 1 10                   Maximum number of iterations (must be > or = to 3)'''

     

    Just replace I04 (integer) by R08 (double) or C80 (character)

     

    Regards

     

    Yann

  • Romain B
    Romain B Altair Community Member
    edited November 2017

    Well, that's exactly it! Thank you!

     

    Is there somewhere I can find a list of all the available data types in macros and how to declare them?

  • Yann_Le_Floch
    Yann_Le_Floch
    Altair Employee
    edited November 2017

    Hi,

    Not really. We want to work on a documentation, but it will be not available before mid 2018.

    To give a small answer, you can use all the entities available in Flux. The special cases are the cases I have give to you  : 

    I04 : integer

    R08 : double

    C80 : character

     

    You can also look at the macros deliver with Flux to be inspire.

     

    Regards

    Yann

     

  • Romain B
    Romain B Altair Community Member
    edited November 2017

    Alright, good to know that you're working on that doc! Keep up the good work!

     

    Have a nice day,

    Romain

  • Yann_Le_Floch
    Yann_Le_Floch
    Altair Employee
    edited December 2017

    Hi Romain,

     

    A member of my team informed me that a small documents already exist (Thanks Abdessamed)

    You will find these documents attached.

    One on pyflux, python for Flux (Altair_Memento_pyFlux_GB-v2.2.pdf) and the other on the usage of python in Flux (Altair_Memento_python_GB-v2.1.pdf)

    These are memento (so you have to print them and fold them into four parts like an accordion)

     

    Best regards

     

    Yann

     

    Unable to find an attachment - read this blog

  • Romain B
    Romain B Altair Community Member
    edited December 2017

    Nice. Thanks!

    Have a nice day.