EcoStruxure Machine Expert Version 1.1 unterstützt nicht die Controller M258, LMC058 und LMC078.

Applikation bereinigen und erstellen

Überblick

Mit der Erweiterung „Applikation bereinigen und erstellen“ können Sie ein Projekt bereinigen oder ein neues Projekt erstellen.

Script Engine-Beispiel

# Enable the new python 3 print syntax
from __future__ import print_function
 
# The path to the project
project_path = r"D:\PythonProjects\Example.project"
 
# Clean up any open project:
if projects.primary:
    projects.primary.close()
 
# Load the project
proj = projects.open(project_path);
 
# Fetch the active application.
app = proj.active_application
 
# Clean application
new_project.clean_application(app)
 
# Compile application and store compiler messages in a list
messages = new_project.compile_application(app)
 
# If messages == None the build was successful
if len(messages) == 0:
    print("--- Build successful ---")
 
# Otherwise print results
else:
    for i in messages:
        print(i.Severity, i.Text)