11.4.1. Python Scripts

Some Python scripts are accessible from the /Data/Shared Data/Sample Files/conf/scripts page. These include the following:

change_permissions_properties.py: Contains two methods. One method is to recursively change the given object permissions for a given folder; the other method is to recursively change the given properties for a given folder.
create_groups_users.py: Contains two methods. One method is to create groups and optionally add users to those groups by reading group properties from a user-supplied csv file; the other method is to create users by reading user properties from a user-supplied csv file.
create_remotefileserver_remoteitem.py: Contains two methods. One method is to create a Remote File Server based on given inputs; the other method is to create a Remote Folder based on given inputs including Remote File Server input.
extract_file_data.py: Extracts all data (metadata/details report/image) for a given file.
extract_file_data_recursively.py: Contains two methods. One method is to find all objects of given types recursively from a given folder and re-extract metadata that failed to extract initially; the other method is find all CAE files recursively from a given folder and generate and add new report child objects for files in which report child objects are missing.
test_script.py: Contains code snippets for performing a variety of operations. If an EKM admin user places the test_script.py file under workspace configuration control (see Configuring a Common Scripts Library), then any user can simply use the name of the macro when defining a custom script.

Release 18.2 - © ANSYS, Inc. All rights reserved.