IFolder¶
- class IFolder¶
Bases:
ImpactCOMWrapperBase- Description:
Represents a folder in the database.
Wraps a COM object or another wrapper instance. Accepts: - A valid impact_object - An existing impact_com_wrapper_base-derived instance
- property allow_save¶
Gets allow_save.
- Description:
Gets and sets the ability to save items in this folder.
- Returns:
The value of allow_save.
- Return type:
allow_save (bool)
- property can_connected_user_save_to¶
Gets can_connected_user_save_to.
- Description:
Returns whether the folder would be available to the connect user from Impact when saving a project.
- Remarks:
There are several reasons why a project might not be available for saving projects. For example it might be read-only, or hidden, or the user’s group might not have the necessary premissions. Introduced in Impact 11.0.0.98
- Returns:
The value of can_connected_user_save_to.
- Return type:
can_connected_user_save_to (bool)
- property children¶
Gets Children.
- Description:
An IFolders collection representing the sub folders of this folder.
- property creator¶
Gets Creator.
- Description:
The user that created this folder.
- property description¶
Gets Description.
- Description:
Gets and sets the description of this folder.
- Returns:
The value of Description.
- Return type:
description (str)
- property display_path¶
Gets display_path.
- Description:
The full path of the folder.
- Remarks:
The full path name of the folder including parent folders separated by backslashes, i.e. ‘Production3January’.
- Returns:
The value of display_path.
- Return type:
display_path (str)
- property folder_count¶
Gets folder_count.
- Description:
The number of sub folders within this folder.
- Remarks:
This is analogous to reading the ‘Children.count’ property but much quicker.
- Returns:
The value of folder_count.
- Return type:
folder_count (int)
- property folder_name¶
Gets folder_name.
- Description:
The name of the folder.
- Remarks:
Simply the name of the folder, i.e. ‘January’.
- Returns:
The value of folder_name.
- Return type:
folder_name (str)
- property folder_path¶
Gets folder_path.
- Description:
The file system path of the folder.
- Remarks:
The file system path of the folder, i.e. ‘d:databasedrawingsd1d37’. This property does not apply if the property IDatabase.files_blobbed is true.
- Returns:
The value of folder_path.
- Return type:
folder_path (str)
Gets Hidden.
- Description:
Gets and sets the ‘hidden’ state of this folder.
- Returns:
The value of Hidden.
- Return type:
hidden (bool)
- property is_visible_to_connected_user¶
Gets is_visible_to_connected_user.
- Description:
Returns whether the folder would be visible to the connect user from Impact.
- Remarks:
There are several reasons why a project might not be visible. For example it might be hidden, or the user’s group might not have the necessary premissions. Introduced in Impact 11.0.0.98
- Returns:
The value of is_visible_to_connected_user.
- Return type:
is_visible_to_connected_user (bool)
- property item_count¶
Gets item_count.
- Description:
The number of IDatabaseItem objects within this folder.
- Remarks:
This is analogous to reading the ‘Items.count’ property but much quicker.
- Returns:
The value of item_count.
- Return type:
item_count (int)
- property items¶
Gets Items.
- Description:
An IDatabaseItems collection representing all the items in this folder.
- Returns:
The value of Items.
- Return type:
- property key¶
Gets Key.
- Description:
The key of this folder.
- Returns:
The value of Key.
- Return type:
key (int)
- property key_path¶
Gets key_path.
- Description:
Returns a sequence of integer values representing the keys of all folders in the folder path.
- Remarks:
Introduced in Impact 11.0.0.98
- Returns:
The value of key_path.
- Return type:
key_path (str)
- property level¶
Gets Level.
- Description:
Indicates the level of the folder.
- Remarks:
The top level folder has a level of zero.
- Returns:
The value of Level.
- Return type:
level (int)
- property parent¶
Gets Parent.
- Description:
The parent folder of this folder.
- Remarks:
If this folder is a top level folder then this property returns NULL.
- property read_only¶
Gets read_only.
- Description:
Gets and sets the read only state of the folder.
- Returns:
The value of read_only.
- Return type:
read_only (bool)
- property site_automatic_item_removal¶
Gets site_automatic_item_removal.
- Description:
For an Enterprise system, determines whether items in the folder may be automatically removed after having been published to the central database.
- Remarks:
For a non-Enterprise system, this propery is irrelevent. Introduced in Impact 11.0.0.33.
- Returns:
The value of site_automatic_item_removal.
- Return type:
site_automatic_item_removal (bool)
- property transmit_to_enterprise¶
Gets transmit_to_enterprise.
- Description:
For an Enterprise system, determines whether projects are automatically published to the central database.
- Remarks:
For a non-Enterprise system, this propery is irrelevent. Introduced in Impact 11.0.0.33.
- Returns:
The value of transmit_to_enterprise.
- Return type:
transmit_to_enterprise (bool)
- property type¶
Gets Type.
- Description:
Indicates the type items the folder contains.
- Returns:
The value of Type.
- Return type:
- add(name)¶
- Description:
Creates a new sub folder within this folder.
- Remarks:
If a folder with the specified name already exists, this method simply returns the existing folder.
- Parameters:
name (str) – Specifies the name of the new folder to create.
- delete()¶
- Description:
Deletes the folder from the database.
- Returns:
If successful this method returns drOK otherwise it returns one of the other constants from the enumeration ipDatabaseResult.
- display_path_translated(language_id)¶
- Description:
Gets the translated version of the folder’s displayed path, in the language specified.
- Remarks:
For a more detailed explanation of the parameters, please see the notes for the master_setting_name_translated method. Introduced in Impact 8.0.0.52
- Parameters:
language_id (any) – A string or enum representing the language wanted.
- Examples:
- find(param)¶
- Description:
Finds a sub folder within this folder.
- Remarks:
No recursion takes place. If a folder is not found this method returns NULL.
- Parameters:
param (any) – Specifies the key or name of the folder to find.
- find_child_by_display_path(display_path)¶
- Description:
Finds a child folder with the specified display path.
- Remarks:
See also find_or_add_child_by_display_path, which will create the folder if it does not exist.
- Parameters:
display_path (str) – Specifies the display path of the child folder to find. Sub-folders should be separated with a backslash; for example “1. Production9Q3”.
- Examples:
- find_items(options)¶
- Description:
Finds database_items in this folder.
- Remarks:
Used in the same way as IDatabase.find_items, but here, the results are restricted to the folder.
- Parameters:
options (IFindItemsOptions) – Parameters that specify how to search for the items.
- find_items_by_sql(s_q_l, order_ascending, order_by)¶
- Description:
Finds database_items in this folder.
- Remarks:
This method has been deprecated. It is recommended that find_items is used instead.
- Parameters:
sql (str) – Where clause of the SQL to find the items.
order_ascending (bool) – Flag indicating the sort direction. True = ascending; false = descending.
order_by (str) – Name of database column by which to order the results.
- find_or_add_child_by_display_path(display_path)¶
- Description:
Finds a child folder with the specified display path, and creates it if it does not exist.
- Remarks:
This method is similar to find_child_by_display_path but it will create any missing folders along the path as required. Introduced in Impact 11.0.0.82.
- Parameters:
display_path (str) – Specifies the display path of the child folder to find or create. Sub-folders should be separated with a backslash; for example “1. Production9Q3”.
- move_to(folder)¶
- Description:
Move the folder to the specified IFolder.
- Parameters:
folder (IFolder) – Specifies the destination IFolder, the folder becomes a child of the specified folder. The IFolder must be in the same database as this item. If the destination folder already has a child folder with the same name this method fails. If the destination folder is a child folder of this folder this method fails. The destination folders Type must match this folder.
- name_translated(language_id, exact_language_match)¶
- Description:
Gets the translated version of the folder name, in the language specified.
- Remarks:
For a more detailed explanation of the parameters, please see the notes for the master_setting_name_translated method. Introduced in Impact 8.0.0.52
- Parameters:
language_id (any) – A string or enum representing the language wanted.
exact_language_match (bool) – Specifies what to do if there is no translation for the specified language.
- Examples:
- refresh()¶
- Description:
Refresh the folder information from the database.
- rename(new_name)¶
- Description:
Renames the folder with the specified new name.
- Remarks:
If a folder with the new name already exists this method will fail.
- Parameters:
new_name (str) – Specifies the new name for the folder.