PropertyEditor#
- Usage:
PropertyEditor Class API Wrapper
- class PropertyEditor[source]#
Bases:
object
Wrapper for PropertyEditor class of Moldflow Synergy.
- commit_changes(action)[source]#
Commit changes to the property editor.
- Parameters:
action (CommitActions | str) – The action to commit.
- Returns:
True if the changes were committed successfully, False otherwise.
- Return type:
bool
- create_entity_list()[source]#
Create a new entity list.
- Returns:
The created entity list.
- Return type:
- create_property(prop_type, prop_id, defaults)[source]#
Create a property
- Parameters:
prop_type (int) – The type of the property.
prop_id (int) – The ID of the property.
defaults (bool) – Whether to use default values for property fields.
- Returns:
The created property.
- Return type:
- delete_property(prop_type, prop_id)[source]#
Delete a property
- Parameters:
prop_type (int) – The type of the property.
prop_id (int) – The ID of the property.
- Returns:
True if the property was deleted successfully, False otherwise.
- Return type:
bool
- fetch_property(prop_type, prop_id, file_name, file_type, file_id)[source]#
Fetch a property from the property editor.
- Parameters:
prop_type (int) – The type of the property.
prop_id (int) – The ID of the property.
file_name (str) – The name of the file.
file_type (MaterialDatabaseType | str) – The type of the file.
string (- Can take empty)
locations (if the file is not in any of the standard database)
case (- In this)
specification (aFile must be a full path)
file_id (int) – The ID of the file.
- Returns:
The fetched property.
- Return type:
- find_property(prop_type, prop_id)[source]#
Find a property
- Parameters:
prop_type (int) – The type of the property.
prop_id (int) – The ID of the property.
- Returns:
The found property.
- Return type:
- get_data_description(prop_type, prop_id)[source]#
Get the field property description.
- Parameters:
prop_type (int) – The type of the property.
prop_id (int) – The ID of the property.
- Returns:
The data description of the property.
- Return type:
str
- get_first_property(prop_type)[source]#
Get the first property of a given type.
- Parameters:
prop_type (int) – The type of the property.
- Returns:
The first property of the specified type.
- Return type:
- remove_unused_properties()[source]#
Remove unused properties in the study. Unused properties are those that are not assigned to any entities.
- Returns:
The number of unused properties removed.
- Return type:
int