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:

EntList

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:

Property

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:

Property

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:

Property

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_entity_property(entities)[source]#

Get the property assigned to an entity.

Parameters:

entities (EntList | None) – The entity.

Returns:

The property of the entities.

Return type:

Property

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:

Property

get_next_property(prop)[source]#

Get the next property in the list.

Parameters:

prop (Property | None) – The current property.

Returns:

The next property in the list.

Return type:

Property

get_next_property_of_type(prop)[source]#

Get the next property of the same type.

Parameters:

prop (Property | None) – The current property.

Returns:

The next property of the same type.

Return type:

Property

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

set_property(entities, prop)[source]#

Assigns a property to a list of entities.

Parameters:
  • entities (EntList | None) – The list of entities to assign the property to.

  • prop (Property | None) – The property to assign.

Returns:

True if the property was assigned successfully, False otherwise.

Return type:

bool