Console
You can use the console to edit several Factory I/O settings.
Note that most of these settings are not available through the user interface and can only be changed through the console.
To open the Console, press \ or click on VIEW > Open Console.
You can execute commands at startup by writing them on an auto.cfg file and placing this file in the installation folder of Factory I/O, in ProgramData\Real Games\Factory IO
or in Documents\Factory IO
.
Note that, when this file is placed in the installation folder of Factory I/O or ProgramData\Real Games\Factory IO
(recommended), it will always be executed independently of any Windows account.
These files are executed first, followed by the one placed in Documents\Factory IO
.
App
Command |
Value |
Default |
Description |
app.is_user_admin |
bool |
Depends on current Windows user |
Checks if the current user is a system administrator. |
app.log_to_console |
bool |
False |
Logs all errors and warnings to the console. |
app.print_args() |
void |
- |
Prints args passed during the launch. |
app.print_system_info() |
void |
- |
Prints information about the graphics card, processor, and OS. |
app.run_in_background |
bool |
True |
Sets the application to run in the background when the window loses focus. |
app.online |
bool |
True |
Allows the application to access the internet. |
app.local_feed |
bool |
False |
Loads Welcome Window contents from local resources. |
app.copy_log() |
void |
- |
Copies the previous log file to ..\Documents\Factory IO . |
app.web_server |
bool |
False |
Runs a web server in the background. |
app.web_server_url |
string |
r'http://*:7410' |
Url for the web server. Must be set before starting the server. |
app.quit() |
void |
- |
Quits the application. |
app.force_quit() |
void |
- |
Forces the application to quit without prompting the user about possibly lost changes. |
Audio
Command |
Value |
Default |
Description |
audio.enabled |
bool |
True |
Turns the audio on or off. |
audio.volume |
float |
1.0 |
Sets the audio volume. |
Camera
Command |
Value |
Default |
Description |
camera.fp_detected |
bool |
False |
Sets a flag that indicates if the first person camera is detected by sensors. |
camera.fov |
float |
50 |
Sets the camera field of view. |
camera.look_invert_x |
bool |
False |
Inverts the camera look on the X axis. |
camera.look_invert_y |
bool |
False |
Inverts the camera look on the Y axis. |
camera.look_sensitivity |
float |
1.0 |
Sets the camera look sensitivity. |
camera.move_sensitivity |
float |
1.0 |
Sets the camera move sensitivity. |
camera.auto_focus |
bool |
False |
Enables orbit camera auto focus. |
camera.lock_mouse_on_rotation |
bool |
True |
Locks the mouse to the center of the window when rotating the camera. |
camera.restrict_to_environment |
bool |
False |
Keeps orbit camera inside the warehouse. |
camera.vertical_obliqueness |
float |
0.0 |
Sets the vertical obliqueness of the camera frustum. |
camera.position_index |
int |
-1 |
Moves the camera to one of the saved positions. |
camera.position_cycle_interval |
float |
0.0 |
Cycle between saved camera positions when in RUN mode. Minimum: 1 second. Use 0 to stop. |
camera.use_planar_drag |
bool |
False |
Use planar movement as the default when dragging parts in RUN mode. |
Console
Command |
Value |
Default |
Description |
console.clear() |
void |
- |
Clears the console. |
console.opacity |
float |
1.0 |
Sets the console opacity. |
console.set_window(int left, int top, int width, int height) |
void |
- |
Sets the location and size of the console window. |
Command |
Value |
Default |
Description |
input.bind_key(string action, string primary_key) |
void |
- |
Binds an action to the desired key. |
input.print_inputs() |
void |
- |
Prints the list of actions and bound keys. |
input.force_alternative_mouse_data |
bool |
False |
Alternative method for calculating mouse movement. Fixes mouse behavior in virtual machines or remote desktop. |
Instructor
Command |
Value |
Default |
Description |
instructor.is_locked |
bool |
False |
Indicates if the current scene has any locked features. |
instructor.lock_scene(string password, bool lock_current_parts, bool run_mode_only, bool hide_failures) |
void |
- |
Locks a scene with a password. |
instructor.unlock_scene(string password) |
bool |
- |
Unlocks a scene with a password. |
License
Command |
Value |
Default |
Description |
license.share_code |
string |
- |
Sets the floating license Share Code to use. |
license.print_ids() |
void |
- |
Prints a list of IDs. |
license.log_enabled |
bool |
True |
Enables logging. |
Physics
Command |
Value |
Default |
Description |
physics.timestep |
float |
1/120 |
The amount of time to step the simulation by (in seconds). Decrease this value (e.g. 1.0/240.0) to increase the quality of the physics simulation; Increase it in order to save CPU cycles when simulating larger scenes. |
physics.max_substeps |
int |
8 |
Maximum number of steps the physics simulation is allowed to take during each frame. Set to 1 to run the simulation with minimal physics impact on performance. However, the simulation may run slower if there isn't enough time during a frame for physics computation. |
physics.solver_iterations |
int |
20 |
Number of iterations of the constraint solver for contact and joint constraints. Increasing the value improves the quality of the physics simulation at the expense of performance. |
Scene
Command |
Value |
Default |
Description |
scene.capture_screenshot(string file_name, bool hide_console) |
void |
- |
Captures a png screenshot. The file name is the name of the .png without the file extension (saved in My Documents/FactoryIO/Screenshots ). Set hide_console to True to hide the console before taking the screenshot. |
scene.capture_screenshot(string file_name, int size, bool hide_console) |
void |
- |
Captures a screenshot using a size multiplier (integer between 1 and 10). Set hide_console to True to hide the console before taking the screenshot. |
scene.current_item_count |
int |
- |
Number of emitted items currently in the scene. Read only. |
scene.debug_emitter_remover |
bool |
True |
Display emitter and remover visuals in Run mode. |
scene.debug_sensor_range |
bool |
False |
Display sensors range in Run mode using a dashed line. |
scene.export_tags(string file_name = None, bool valid_iec_identifiers = False) |
void |
- |
Exports all tags in the scene to a plain text file (txt) in the Documents\Factory IO\ folder. Set valid_iec_identifiers to True to ensure tag names become valid IEC 61131-3 identifiers. |
scene.export_tags_csv(string file_name = None, bool valid_iec_identifiers = False) |
void |
- |
Exports all tags in the scene to a comma-separated values file (csv) in the Documents\Factory IO\ folder. Set valid_iec_identifiers to True to ensure tag names become valid IEC 61131-3 identifiers. |
scene.start_tag_export(float interval) |
void |
- |
Start exporting tags to a comma-separated values file (csv) at repeated intervals. |
scene.start_tag_export(string file_name, float interval) |
void |
- |
Start exporting tags to a comma-separated values file (csv) at repeated intervals. |
scene.stop_tag_export() |
void |
- |
Stop tag export operation. |
scene.load_from_path(string scene_path) |
void |
- |
Loads a scene from a path. The following command loads the scene assembler from the Desktop. Note that you must either use two backslashes when specifying the scene's path, or prefix with 'r' scene.load_from.path(r"C:\Users\XXXX\Desktop\assembler.factoryio") |
scene.max_item_count |
int |
500 |
Maximum number of items that can be emitted. |
scene.my_scenes_path |
string |
- |
Sets the "My Scenes" path, i.e the directory where your scenes will be saved and loaded from. You can set a path relative to the application executable by starting it with .\ . For example, .\MyScenes will be relative to Factory IO.exe. |
scene.print_saves() |
void |
- |
Prints the scenes list. |
scene.start_in_run_mode |
bool |
False |
Starts the scene in Run mode. |
scene.time_scale |
float |
0.1 |
Sets the time scale used for slow motion (use with care, may create instability in the physics simulation). |
Stats
Command |
Value |
Default |
Description |
stats.reset() |
void |
- |
Resets the performance statistics. |
stats.visible |
bool |
False |
Shows the performance statistics. |
Video
Command |
Value |
Default |
Description |
video.print_supported_res() |
void |
- |
Prints the supported screen resolutions. |
video.print_available_qualities() |
void |
- |
Prints the available video qualities. |
video.print_fsr2_available_qualities() |
void |
- |
Prints the available FSR2 qualities. |
video.keep() |
void |
- |
Accepts the current settings. |
video.position |
(int, int) |
- |
Sets the application window position. |
video.maximized |
bool |
False |
Sets the application window state to maximized. |
video.fullscreen |
bool |
False |
Sets the application to run in fullscreen. Call video.keep() to accept it. |
video.resolution |
(int, int) |
- |
Sets the screen resolution. Call video.keep() to accept it. |
video.quality |
string |
'Medium' |
Sets the video quality ('Very Low', 'Low', 'Medium', 'High', 'Very High'). |
video.motion_blur |
bool |
False |
Turns the motion blur effect on or off. |
video.grain |
bool |
Depends on quality |
Turns the grain effect on or off. Applied by default on very high quality. |
video.ssao |
bool |
Depends on quality |
Turns the screen space ambient occlusion on or off. Applied by default on very high quality. |
video.aa |
int |
Depends on quality |
Sets the anti-aliasing value (0, 2, 4 or 8). |
video.target_fps |
int |
60 |
How many times the video is rendered per second. Setting to 0 makes the video render as fast as possible. |
video.vsync |
int |
0 |
Sets the number of VSyncs that should pass between each frame (0 to not wait for VSync). |
video.post_processing |
bool |
True |
Turns all post-processing effects on or off. |
video.background_color |
string |
'#3F4953' |
Sets the background color. |
video.draw_environment |
bool |
True |
Turns the warehouse environment on or off. |
video.fsr2 |
bool |
False |
Turns FSR2 on or off. |
video.fsr2_quality |
string |
'Balanced' |
Sets the FSR2 quality ('Ultra Quality', 'Quality', 'Balanced', 'Performance', 'Ultra Performance') |
UI
Command |
Value |
Default |
Description |
ui.show_camera_navigation |
bool |
True |
Shows the camera navigation gizmo. |
ui.show_sensors |
bool |
False |
Shows the sensors tags. |
ui.show_actuators |
bool |
False |
Shows the actuators tags. |
ui.show_addresses |
bool |
False |
Shows the addresses of the sensors and actuators tags. |
ui.show_welcome_window |
bool |
True |
Shows the welcome screen at startup. |
ui.scene_list_order_by |
string |
'name' |
Criterium for ordering scenes in the Open and Save windows ('name', 'date'). |
ui.scene_list_reverse_order |
bool |
False |
Reverse scene ordering in the Open and Save windows. |
ui.enabled |
bool |
True |
Shows the user interface. |
Drivers
Command |
Value |
Default |
Description |
drivers.apply_current_mapping_to_all() |
|
- |
Copies the tag to I/O point mapping of the current driver to all others. |
drivers.export_mapping(string filename) |
|
- |
Exports the mapping between scene tags and driver I/O points for the current driver. Data is exported as csv file for all supported drivers except for Siemens which are exported as TIA Portal compatible xml. This feature is implemented in Allen-Bradley, Automgen, MHJ, Modbus and Siemens drivers. |
Allen-Bradley Logix5000
Command |
Value |
Default |
Description |
drivers.allen_bradley_logix5000.ip_address |
string |
- |
Sets the hostname or IP address of the PLC. |
drivers.allen_bradley_logix5000.auto_connect |
bool |
False |
Indicates whether this driver should automatically connect to the server. |
Allen-Bradley Micro800
Command |
Value |
Default |
Description |
drivers.allen_bradley_micro800.ip_address |
string |
- |
Sets the hostname or IP address of the PLC. |
drivers.allen_bradley_micro800.auto_connect |
bool |
False |
Indicates whether this driver should automatically connect to the server. |
Allen-Bradley MicroLogix
Command |
Value |
Default |
Description |
drivers.allen_bradley_micrologix.ip_address |
string |
- |
Sets the hostname or IP address of the PLC. |
drivers.allen_bradley_micrologix.auto_connect |
bool |
False |
Indicates whether this driver should automatically connect to the server. |
Allen-Bradley SLC5
Command |
Value |
Default |
Description |
drivers.allen_bradley_slc5.ip_address |
string |
- |
Sets the hostname or IP address of the PLC. |
drivers.allen_bradley_slc5.auto_connect |
bool |
False |
Indicates whether this driver should automatically connect to the server. |
Advantech USB 4704 & USB 4750
Command |
Value |
Default |
Description |
drivers.advantech_4750.auto_connect |
bool |
False |
Indicates whether this driver should automatically connect to any available boards. |
drivers.advantech_4704.auto_connect |
bool |
False |
Indicates whether this driver should automatically connect to any available boards. |
Automgen Server
Command |
Value |
Default |
Description |
drivers.automgen.auto_connect |
void |
False |
Indicates whether this driver should start the server automatically. |
drivers.automgen.port |
int |
4000 |
Sets the server listening port. |
Modbus TCP/IP Client
Command |
Value |
Default |
Description |
drivers.modbustcp_client.auto_connect |
void |
False |
Indicates whether this driver should automatically connect to the server. |
drivers.modbustcp_client.port |
int |
502 |
Sets the server port number. |
drivers.modbustcp_client.ip_address |
string |
127.0.0.1 |
Sets the hostname or IP address of the server. |
drivers.modbustcp_client.slave_id |
int |
1 |
Sets the slave ID. |
Modbus TCP/IP Server
Command |
Value |
Default |
Description |
drivers.modbustcp_server.auto_connect |
void |
False |
Indicates whether this driver should automatically start the server. |
drivers.modbustcp_server.port |
int |
502 |
Sets the server port number. |
drivers.modbustcp_server.slave_id |
int |
1 |
Sets the slave ID. |
OPC Client DA/UA
Command |
Value |
Default |
Description |
drivers.opc_client.ua_application_name |
string |
Factory I/O |
Gets the name of the client application. |
drivers.opc_client.ua_session_name |
string |
OPC UA Driver |
Sets the name used to identify a session of this client. |
drivers.opc_client.ua_session_timeout |
int |
60000 (ms) |
Sets the wait time before an active session is handled as expired. |
drivers.opc_client.ua_operation_timeout |
int |
60000 (ms) |
Sets the wait time before terminating an operation being processed by the server. |
drivers.opc_client.ua_disconnect_timeout |
int |
10000 (ms) |
Sets the wait time before terminating the attempt to shutdown an active session. |
drivers.opc_client.ua_reconnect_timeout |
int |
10000 (ms) |
Sets the wait time before terminating the attempt to reconnect to a halted session. |
drivers.opc_client.ua_cert_app_path |
string |
- |
Sets the certificate store path used by the application to store its own certificates. Default path: Installation Folder\CertificateStores\App |
drivers.opc_client.ua_cert_rejected_path |
string |
- |
Sets the certificate store path used to store all certificates which are not trusted. Default path: Installation Folder\CertificateStores\Rejected |
drivers.opc_client.ua_cert_trusted_issuer_path |
string |
- |
Sets the certificate store path used to store all certificates of trusted issuers. Default path: Installation Folder\CertificateStores\Trusted Issuer |
drivers.opc_client.ua_cert_trusted_peer_path |
string |
- |
Sets the certificate store path used to store all certificates of trusted applications. Default path: Installation Folder\CertificateStores\Trusted Peer" |
drivers.opc_client.ua_cert_path |
string |
- |
Sets a path to a user defined certificate. This certificate will be automatically added to the ApplicationStore. |
drivers.opc_client.ua_username |
string |
- |
Sets the username (user identity). |
drivers.opc_client.ua_password |
string |
- |
Sets the password (user identity). |
drivers.opc_client.ua_user_identity_cert_path |
string |
- |
Sets the path for a user identity certificate (X509). |
Siemens LOGO!
Command |
Value |
Default |
Description |
drivers.siemens_logo_0ba7_tcp.auto_connect |
bool |
False |
Indicates whether this driver should automatically connect to the PLC. |
drivers.siemens_logo_0ba7_tcp.ip_address |
string |
- |
Sets the hostname or IP address of the PLC. |
drivers.siemens_logo_0ba7_tcp.network_adapter |
string |
- |
Sets the network adapter to use. |
drivers.siemens_logo_0ba8_tcp.auto_connect |
bool |
False |
Indicates whether this driver should automatically connect to the PLC. |
drivers.siemens_logo_0ba8_tcp.ip_address |
string |
- |
Sets the hostname or IP address of the PLC. |
drivers.siemens_logo_0ba8_tcp.network_adapter |
string |
- |
Sets the network adapter to use. |
Siemens S7-200/300/400
Command |
Value |
Default |
Description |
drivers.siemens_s7300_s7400.auto_connect |
bool |
False |
Indicates whether this driver should automatically connect to the PLC. |
drivers.siemens_s7300_s7400.ip_address |
string |
- |
Sets the hostname or IP address of the PLC. |
drivers.siemens_s7300_s7400.network_adapter |
string |
- |
Sets the network adapter to use. |
drivers.siemens_s7300_s7400.slot |
int |
2 |
Sets the PLC slot (2...18). |
drivers.siemens_s7300_s7400.rack |
int |
0 |
Sets the PLC rack (0...4). |
drivers.siemens_s7300_s7400.plc_type |
int |
1 |
Sets the PLC type (S7-200 = 0, S7-300 = 1, S7-400 = 2). |
Siemens S7-1200/1500
Command |
Value |
Default |
Description |
drivers.siemens_s71200_s71500.auto_connect |
bool |
False |
Indicates whether this driver should automatically connect to the PLC. |
drivers.siemens_s71200_s71500.ip_address |
string |
- |
Sets the hostname or IP address of the PLC. |
drivers.siemens_s71200_s71500.network_adapter |
string |
- |
Sets the network adapter to use. |
drivers.siemens_s71200_s71500.plc_type |
int |
0 |
Sets the PLC type (S7-1200 = 0, S7-1500 = 1) |
Siemens S7-PLCSIM
Command |
Value |
Default |
Description |
drivers.siemens_s7plcsim.auto_connect |
bool |
False |
Indicates whether this driver should automatically connect to S7-PLCSIM. |
drivers.siemens_s7plcsim.connection_timeout |
int |
45 |
Connection timeout in seconds. |
drivers.siemens_s7plcsim.instance_name |
string |
factoryio |
S7-PLCSIM Advanced PLC instance name. |