StudyDoc#

Usage:

StudyDoc Class API Wrapper

class StudyDoc[source]#

Bases: object

Wrapper for StudyDoc class of Moldflow Synergy.

add_file(name, opts, show_logs)[source]#

Adds a CAD model file to the current study

Parameters:
  • name (str) – Name of the file to add

  • opts (ImportOptions | None) – Import options for the file

  • show_logs (bool) – True if display logs

Returns:

True if successful, False otherwise.

Return type:

bool

analysis_name(index)[source]#

Gets the name of the analysis at the given index

Parameters:

index (int) – Index of the analysis

Returns:

The name of the analysis

Return type:

str

property analysis_sequence: str#

Value of Analysis Sequence.

Getter:

Get value of Analysis Sequence

Setter:

Set value of Analysis Sequence

Type:

str

property analysis_sequence_description: str#

Value of Analysis Sequence Description.

Getter:

Get value of Analysis Sequence Description

Setter:

Set value of Analysis Sequence Description

Type:

str

analysis_status(index)[source]#

Gets the status of the analysis at the given index

Parameters:

index (int) – Index of the analysis

Returns:

The status of the analysis

Return type:

str

analyze_now(check, solve, prompts=False)[source]#

Runs analysis immediately

Parameters:
  • check (bool) – True if check only

  • solve (bool) – True if solve only

  • prompts (bool) – True if display prompts

Returns:

True if successful, False otherwise.

Return type:

bool

close(show_prompt=True)[source]#

Closes the study

Parameters:

show_prompt (bool) – Prompt to save changes or not (default: None)

Returns:

True if successful, False otherwise.

Return type:

bool

create_entity_list()[source]#

Creates a new entity list.

Returns:

A new entity list.

Return type:

EntList

delete_results(index)[source]#

Deletes results starting from the given index

Parameters:

index (int) – Start index of results to be deleted

Returns:

True if successful, False otherwise.

Return type:

bool

export_analysis_log(file)[source]#

Export analysis log to text file

Parameters:

file (str) – File name to export analysis log

Returns:

True if successful, False otherwise.

Return type:

bool

export_mesh_log(file)[source]#

Export mesh log to text file

Parameters:

file (str) – File name to export mesh log

Returns:

True if successful, False otherwise.

Return type:

bool

get_curve_point(curve, pos_curve)[source]#

Gets a specified point on the curve

Parameters:
  • curve (EntList | None) – The curve to get point from

  • pos_curve (float) – The position on the curve

Returns:

The point on the curve

Return type:

Vector

get_elem_nodes(elem)[source]#

Gets the nodes of an element

Parameters:

elem (EntList | None) – The element to get nodes from

Returns:

The nodes of the element

Return type:

EntList

get_entity_id(ent)[source]#

Gets entity ID

Parameters:

ent (EntList | None) – The entity

Returns:

The ID of the entity

Return type:

int

get_entity_layer(ent)[source]#

Gets the layer that the entity is assigned to

Parameters:

ent (EntList | None) – The entity to get layer

Returns:

The layer of the entity

Return type:

EntList

get_first_beam()[source]#

Gets the first beam in the study

Returns:

The first beam in the study

Return type:

EntList

get_first_curve()[source]#

Gets the first curve in the study

Returns:

The first curve in the study

Return type:

EntList

get_first_node()[source]#

Gets the first node in the study

Returns:

The first node in the study

Return type:

EntList

get_first_tet()[source]#

Gets the first tetrahedral element in the study

Returns:

The first tetrahedral element in the study

Return type:

EntList

get_first_tri()[source]#

Gets the first triangle in the study

Returns:

The first triangle in the study

Return type:

EntList

get_next_beam(beam)[source]#

Gets the next beam in the study

Parameters:

beam (EntList | None) – The current beam

Returns:

The next beam in the study

Return type:

EntList

get_next_curve(curve)[source]#

Gets the next curve in the study

Parameters:

curve (EntList | None) – The current curve

Returns:

The next curve in the study

Return type:

EntList

get_next_node(node)[source]#

Gets the next node in the study

Parameters:

node (EntList | None) – The current node

Returns:

The next node in the study

Return type:

EntList

get_next_tet(tet)[source]#

Gets the next tetrahedral element in the study

Parameters:

tet (EntList | None) – The current tetrahedral element

Returns:

The next tetrahedral element in the study

Return type:

EntList

get_next_tri(tri)[source]#

Gets the next triangle in the study

Parameters:

tri (EntList | None) – The current triangle

Returns:

The next triangle in the study

Return type:

EntList

get_node_coord(node)[source]#

Gets node coordinates

Parameters:

node (EntList | None) – The current node

Returns:

The coordinates of the node

Return type:

Vector

get_part_cad_names()[source]#

Return the names of all cad models as a string array

Returns:

The names of all cad models

Return type:

StringArray

get_result_prefix(name)[source]#

Gets result prefix string of a given process

Parameters:

name (str) – The name of the process

Returns:

The result prefix of the process

Return type:

str

import_process_condition(file, show_prompt)[source]#

Import process condition from MPX

Parameters:
  • file (str) – udm file from MPX

  • show_prompt (bool) – True if display prompt

Returns:

True if successful, False otherwise.

Return type:

bool

import_process_variation(file, doe, show_prompt)[source]#

Import process variation from MPX/Shotscope

Parameters:
  • file (str) – udm file from MPX/Shotscope

  • doe (bool) – True if set up DOE analysis

  • show_prompt (bool) – True if display prompt

Returns:

True if successful, False otherwise.

Return type:

bool

is_analysis_running()[source]#

Checks if the analysis is currently running

Returns:

True if the analysis is running, False otherwise

Return type:

bool

mark_analysis_summary_for_export(marking)[source]#

Marks the summary for export

Parameters:

marking (bool) – True if mark for export

Returns:

True if successful, False otherwise.

Return type:

bool

mesh_now(show_prompts)[source]#

Runs mesh immediately

Parameters:

show_prompts (bool) – True if display prompts

Returns:

True if successful, False otherwise.

Return type:

bool

mesh_status()[source]#

Gets the status of the mesh at the given index

Parameters:

index – Index of the mesh

Returns:

The status of the mesh

Return type:

str

property mesh_type: str#

Value of Mesh Type.

Getter:

Get value of Mesh Type

Setter:

Set value of Mesh Type

Type:

str

property molding_process: str#

Value of Molding Process.

Getter:

Get value of Molding Process

Setter:

Set value of Molding Process

Type:

str

property notes: str#

Gets study notes :getter: Get study notes :setter: Set study notes :type: str

property number_of_analyses: int#

Value of Number of Analyses.

Getter:

Get value of Number of Analyses

Type:

int

redo(num)[source]#

Redoes a number of model editing

Parameters:

num (int) – Number of redo steps

Returns:

True if successful, False otherwise.

Return type:

bool

save()[source]#

Saves the study

Returns:

True if successful, False otherwise.

Return type:

bool

save_as(name)[source]#

Saves the study under a new name

Parameters:

name (str) – New study name

Returns:

True if successful, False otherwise.

Return type:

bool

property selection: EntList#

Value of Selection.

Getter:

Get value of Selection

Setter:

Set value of Selection

Type:

EntList

property study_name: str#

Value of Study Name.

Getter:

Get value of Study Name

Setter:

Set value of Study Name

Type:

str

undo(num)[source]#

Undoes a number of model edit

Parameters:

num (int) – Number of undo steps

Returns:

True if successful, False otherwise.

Return type:

bool