ScriptFactory_2024
ScriptFactory_2024
Script Factory
General user information
Altairhyperworks.com
Altair® FluxMotor® 2024 p. 2
Contents
“Script Factory” is a dedicated application to create and manage python Altair® FluxMotor® scripts.
Classical functions such as “Save, Undo, Redo and Store” are also available.
From Motor Factory / Export environment / Script, it is possible to open the python script of a current motor with all the needed
commands defining it.
1 Click on “Script Factory” on the left part of the supervisor to open the “Script Factory” application
The motive of the Script Factory is to give the possibility to automate some study such as lunch serial tests or serial design winding
configurations.
Note: A double click on the python file directly open it in the editor.
Note:
To “Store” a file you can also use the classical shortcut keyboard “Ctrl+T”
Note:
To “Save” a file you can also use the classical shortcut keyboard “Ctrl+S”
To “Save as” a file you can also use the classical shortcut keyboard “Ctrl+E”
How to run and stop a python Script from the workspace tree?
1 Click on the icon RUN via the LAUNCHER menu to run the Edited file.
2 The LOG folder scrolls during the run and a ping-pong bar appears.
3 To stop the file execution, click on the icon STOP via the LAUNCHER menu.
2.8 Editor
Script Factory editor is located at the center panel of the application, and it allows to edit the python script in the usual way.
How to open a python Script from the workspace tree in system explorer?
1 Select a python file in the workspace tree.
2 Right click on the selected python file and select “Open in the system explorer” option.
3 The system explorer window of the selected file is opened.
3 MISCELLANEOUS TOPICS
3.1 Script for filling the slots.
From the drop-down menu available on the left top part of Motor Factory, it is possible to open a “Debug” dialog box, in which the script
commands can be written and executed.
A new command dedicated to the slot filling has been implemented. It allows to define and apply the geometric slot filling (height filling
factor).
setDiameterBasedOnGeometricalFillFactor(geoFF=0.65,noTurnsPerCoil =12,noWiresInHand=4)
In this example, the goal is to find the wire diameter, which allows to define a geometric fill factor equal to 0.65 by considering a coil built
with 12 turns and 4 wires in hand (in parallel).
Note: This script command can run for tooth winding slot a well. In that case the definition of the geometric fill factor = Height filling factor,
can be illustrated as below:
Definition of the geometric fill factor for the tooth winding = Height filling factor