🎉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

LUA Scripting with FEKO

User: "Altair Forum User"
Altair Employee
Updated by Altair Forum User

hi. i am currently able to load a cfx file with lua script as follows:

 app = cf.GetApplication() project = app:OpenFile('doit.cfx')

How can change or see variables inside this file?

Thanks...

Find more posts tagged with

Sort by:
1 - 4 of 41
    User: "JIF"
    Altair Employee
    Updated by JIF

    Hello mustaphos,

     

    At this point you need to have a look at the CADFEKO API. Everything you need will be under 'project'. I would suggest that you have a look at chapter 7.1 (Scripting basics) and in particular the example in 7.1.1. I would then suggest that you work through example I-1 in the Example guide since it walks you through the process of creating a model in CADFEKO. Reading settings from the model is the same and it is also demonstrated.

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Hello @mustaphos,

     

    @JIF beat me to it...! ;)/emoticons/default_wink.png' srcset='/emoticons/wink@2x.png 2x' title=';)' width='20' />  Of course, this is the 'more correct' way to learn how to do scripting and automation.

     

    The shortcut way to get started with scripting (in CADFEKO) is to use 'Macro recording'.  You'll see in the status bar (in the bottom of the application) a button with a puzzle piece and a red circle.  If you press this, then CADFEKO will record every action you take that changes the model.  In other words, if you start recording and create / modify / delete a variable, then a script will be recorded that shows you how to do precisely that one bit of scripting. 

     

    It's cheating but I won't tell anyone.

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Hello @mustaphos,

     

    @JIF beat me to it...! ;)/emoticons/default_wink.png' srcset='/emoticons/wink@2x.png 2x' title=';)' width='20' />  Of course, this is the 'more correct' way to learn how to do scripting and automation.

     

    The shortcut way to get started with scripting (in CADFEKO) is to use 'Macro recording'.  You'll see in the status bar (in the bottom of the application) a button with a puzzle piece and a red circle.  If you press this, then CADFEKO will record every action you take that changes the model.  In other words, if you start recording and create / modify / delete a variable, then a script will be recorded that shows you how to do precisely that one bit of scripting. 

     

    It's cheating but I won't tell anyone.

    Wow it's very nice.

    Thanks you sir.

    I immediately found the variables i wanted.

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Great! I'm glad it helps.  It's definitely worth it to go through the Examples Guide example, though.  It takes you through the basic concepts and shows you how to navigate the API documentation.