Profilo di visualizzazione

Panoramica

Con l'estensione del profilo di visualizzazione, è possibile visualizzare i profili di visualizzazione e impostare il profilo di visualizzazione attivo del progetto.

Esempio di Script Engine

# Enable the new python 3 print syntax
from __future__ import print_function
 
#The path to the project
project_path = r"D:\PythonProjects\GetVisualizationProfile.project"
 
# Clean up any open Project:
if projects.primary:
    projects.primary.close()
 
# Load the project
proj = projects.open(project_path);
 
# Set the project as primary project
proj = projects.primary
 
# Print the active profile
print("Current visual profile: " +
visualization_settings.active_profile_name)
 
# Get all available visualization profiles
profile_names = visualization_settings.get_all_visual_profile_names()
 
# Print the profiles
for visual_profile in profile_names:
    print (" - " + visual_profile)
 
# Set the profile to "SoMachine Motion V4.2"
visualization_settings.active_profile_name = "SoMachine Motion V4.2"
 
# Get the active profile
profile_name = visualization_settings.active_profile_name
 
# Print the active profile
print("New visual profile: " + profile_name)
 
# Save project
projects.primary.save()