The Siemens Community Catalyst program was co-created with our community to acknowledge technology leaders who consistently contribute to the Siemens Community. Nominations are accepted on a rolling basis.
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...
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.
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.
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.
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.
Join us for a community conversation on how High-Performance Computing (HPC) and Simcenter PSIM work together to meet the increasing demands of modern power electronics simulation. During this one-hour technical session, you'll discover how leveraging HPC can speed up simulations, improve scalability, and empower engineers…
Join us for a community conversation on accelerating your motor simulation workflow with Simcenter Simlab. In this beginner-friendly session, we'll introduce the platform's automated model-building capabilities and show how easy it is to set up your first electric motor analysis. You'll see the basic steps of geometry…
Join us for a Community Conversation where we'll discuss practical approaches to analyzing complex electromagnetic models using hybrid solver techniques. This session will provide a general overview of how different computational methods can be combined within a single simulation to address models containing varied…