Information & Examples for building User Overlays / Macros

Christian Nörenberg
Christian Nörenberg Altair Community Member
edited October 2021 in Community Q&A

Hi,

I built the following macro:
You can select a geometric parameter and a minimum & maximum.
With this function I can check whether the limits are feasible/valid or not.

I would like to add features to the interface like getting the reference value automaticly after selecting a parameter and view it in a disabled entry.

But to increase the functionality, I need more information about building macros and overlays.
In the end it might be better to build an user overlay because you can use more difficult interfaced, but I can't find any information for this topic. Only the small chapter in the memento file.

#! Flux2D 21.1  import time  """ @param parameter   ParameterGeom          1 1 None         Select input parameter @param minimum     R08                    1 1 0.8          Minimum @param maximum     R08                    1 1 1.2          Maximum """   def check_limits(parameter, minimum, maximum):     nominal_value = float(parameter.expression)     sleeping_time = 2.  # s      deleteMesh()      parameter.expression = str(minimum * nominal_value)     time.sleep(sleeping_time)      parameter.expression = str(maximum * nominal_value)     time.sleep(sleeping_time)      parameter.expression = str(nominal_value)      return
Tagged:

Answers

  • asoualmi
    asoualmi
    Altair Employee
    edited October 2021

    Hi,

    Sorry for the delay, unfortunately there is no additional document abut the macro creation. Also for the Overlay there is no documentation.

    Sorry for this inconvenience.

    Best regards.