FolderManager#
- Usage:
FolderManager Class API Wrapper
- class FolderManager[source]#
Bases:
object
Wrapper for FolderManager class of Moldflow Synergy.
- allow_clipping(folder, checked)[source]#
Allow clipping for a folder.
- Parameters:
folder (EntList) – The folder to set clipping for.
checked (bool) – Whether to allow clipping.
- Returns:
True if the operation was successful, False otherwise.
- Return type:
bool
- create_folder()[source]#
Create a new layer folder.
- Returns:
True if the folder was created successfully, False otherwise.
- Return type:
bool
- create_folder_by_name(name)[source]#
Create a folder by name.
- Parameters:
name (str) – The name of the folder to create.
- Returns:
The created folder.
- Return type:
- delete_folder(folder, move_layers)[source]#
Delete a folder.
- Parameters:
folder (EntList) – The folder to delete.
move_layers (bool) – Whether to move layers under the folder to the active layer
them. (or to delete)
- Returns:
True if the folder was deleted successfully, False otherwise.
- Return type:
bool
- expand_folder(folder, levels, expand_new_layer, inc_nodes, inc_tris, inc_tetras, inc_beams)[source]#
Expand a folder to a specified number of levels.
- Parameters:
folder (EntList) – The folder to expand.
levels (int) – The number of levels to expand.
expand_new_layer (bool) – Whether to create a new layer for the expanded entities.
inc_nodes (bool) – Whether to include mesh nodes.
inc_tris (bool) – Whether to include mesh triangles.
inc_tetras (bool) – Whether to include mesh tetras.
inc_beams (bool) – Whether to include mesh beams.
- Returns:
The number of entities affected.
- Return type:
int
- find_folder_by_name(name)[source]#
Find a folder by name.
- Parameters:
name (str) – The name of the folder to find.
- Returns:
The found folder.
- Return type:
- get_name(folder)[source]#
Get the name of a folder.
- Parameters:
folder (EntList) – The folder to get the name of.
- Returns:
The name of the folder.
- Return type:
str
- hide_all_other_folders(folder)[source]#
Hide all other folders except the specified one.
- Parameters:
folder (EntList) – The folder to keep visible.
- Returns:
True if the operation was successful, False otherwise.
- Return type:
bool
- remove_empty_folders()[source]#
Remove empty folders.
- Returns:
True if the operation was successful, False otherwise.
- Return type:
bool
- remove_objects_from_folder(objects)[source]#
Remove layers/folders from the parent folder.
- Parameters:
objects (EntList) – The objects to remove.
- Returns:
True if the objects were removed successfully, False otherwise.
- Return type:
bool
- set_folder_name(folder, name)[source]#
Set the name of a folder.
- Parameters:
folder (EntList) – The folder to rename.
name (str) – The new name for the folder.
- Returns:
True if the folder name was set successfully, False otherwise.
- Return type:
bool
- set_type_color(folder, entity_type, default, red, green, blue)[source]#
Set the color of a folder.
- Parameters:
folder (EntList) – The folder to set the color for.
entity_type (EntityType | str) – The type of entity.
default (bool) – Whether to use the default color.
red (int) – The red component of the color (0-255).
green (int) – The green component of the color (0-255).
blue (int) – The blue component of the color (0-255).
- Returns:
The integer identifier for the color
- Return type:
int
- set_type_display_option(folder, entity_type, option)[source]#
Set the display option of a folder.
- Parameters:
folder (EntList) – The folder to set the display option for.
entity_type (EntityType | str) – The type of entity.
option (DisplayOption | str) – The display option to set.
Display Option
Triangle
Beam Elements
Tert Elements
Node
Surface
Region
STL Facet
Curve
Solid
X
X
X
X
X
X
Solid + Element Edges
X
X
X
Transparent
X
X
X
X
X
X
Transparent + Element Edges
X
X
X
Shrunken
X
X
X
Axis Line Only
X
X
Point
X
Triad
X
Net
X
X
X
Solid + Net
X
X
X
Transparent + Net
X
X
X
- Returns:
True if the display option was set successfully, False otherwise.
- Return type:
bool
- set_type_show_glyphs(folder, entity_type, show)[source]#
Set the visibility of glyphs for a specific entity type in a folder.
- Parameters:
folder (EntList) – The folder to set the glyph visibility for.
entity_type (EntityType | str) – The type of entity.
show (bool) – Whether to show or hide the glyphs.
- Returns:
True if the glyph visibility was set successfully, False otherwise.
- Return type:
bool
- set_type_show_labels(folder, entity_type, show)[source]#
Set the visibility of labels for a specific entity type in a folder.
- Parameters:
folder (EntList) – The folder to set the label visibility for.
entity_type (EntityType | str) – The type of entity.
show (bool) – Whether to show or hide the labels.
- Returns:
True if the label visibility was set successfully, False otherwise.
- Return type:
bool
- set_type_visible(folder, entity_type, visible)[source]#
Set the visibility of a folder.
- Parameters:
folder (EntList) – The folder to set the visibility for.
entity_type (EntityType | str) – The type of entity.
visible (bool) – Whether to make the folder visible.
- Returns:
True if the visibility was set successfully, False otherwise.
- Return type:
bool
- show_all_folders()[source]#
Show all folders.
- Returns:
True if all folders were shown successfully, False otherwise.
- Return type:
bool
- show_folders(folders, show)[source]#
Show or hide folders.
- Parameters:
folders (EntList) – The folders to show or hide.
show (bool) – Whether to show or hide the folders.
- Returns:
True if the folders were shown/hidden successfully, False otherwise.
- Return type:
bool
- show_glyphs(folder, show)[source]#
Show or hide glyphs for a folder.
- Parameters:
folder (EntList) – The folder to show/hide glyphs for.
show (bool) – Whether to show or hide the glyphs.
- Returns:
True if the glyphs were shown/hidden successfully, False otherwise.
- Return type:
bool