IDatabaseWindow¶
- class IDatabaseWindow¶
Bases:
ImpactCOMWrapperBase- Description:
Allows access to the active database window being displayed.
- Remarks:
This object provides access to the values being displayed within the active database window. This object is only valid when the user has pressed a database window button or database window action menu item to run a script. There are some differences between the use of IDatabaseWindow when using it with internal or external database tables. Internal database tables are those associated with the active drawing, external database tables are those used for storing data into other database tables. When used with internal data, the Values member of this object should be used instead of directly writing into the IDatabaseValues of an IDrawing or ILayer. You can use the events generated by external database windows to validate values being entered by users into database tables. To validate database values for internal drawing data you should use the Save and save_as auto-tasks instead.
Wraps a COM object or another wrapper instance. Accepts: - A valid impact_object - An existing impact_com_wrapper_base-derived instance
- property accept_values¶
Gets accept_values.
- Description:
Gets and sets the flag to accept the current database values.
- Remarks:
This member is only used by external database windows. When used with the change_validate, insert_validate, and delete_validate database window events you can specify whether the current values should be accepted. The operation will stop and ensure the user enters new values. It is the responsibility of the script to display an appropriate message to the user if they set accept_values to false.
- Returns:
The value of accept_values.
- Return type:
accept_values (bool)
- property child_column_name¶
Gets child_column_name.
- Description:
Child column name.
- Remarks:
Introduced in Impact 11.0.0.27
- Returns:
The value of child_column_name.
- Return type:
child_column_name (str)
- property current_field¶
Gets current_field.
- Description:
Gets or sets the name of the column that is currently being edited.
- Remarks:
Introduced in Impact 11.0.0.27
- Returns:
The value of current_field.
- Return type:
current_field (str)
- property drawing¶
Gets Drawing.
- Description:
Returns an IDrawing object for the drawing being displayed in the active database window.
- Remarks:
This member is not valid for an external database window.
- property layer¶
Gets Layer.
- Description:
Returns an ILayer object for the layer being displayed in the active database window.
- Remarks:
This member is not valid for an external database window. Always use this member to determine the ILayer associated with the active database window. Using Impact.active_drawing.active_layer will not always return the correct layer for the displayed database window.
- property parent_key_value¶
Gets parent_key_value.
- Description:
Parent key value.
- Remarks:
Introduced in Impact 11.0.0.27
- Returns:
The value of parent_key_value.
- Return type:
parent_key_value (any)
- property parent_table_name¶
Gets parent_table_name.
- Description:
Parent table.
- Remarks:
Introduced in Impact 11.0.0.27
- Returns:
The value of parent_table_name.
- Return type:
parent_table_name (str)
- property table_name¶
Gets table_name.
- Description:
Gets the name of the database table displayed in the active database window.
- Returns:
The value of table_name.
- Return type:
table_name (str)
- property values¶
Gets Values.
- Description:
Provides a IDatabaseValues object for access to the values being displayed in the active database window.
- Remarks:
Always use this IDatabaseValues object instead of reading and writing into the IDatabaseValues of an IDrawing or ILayer. This is because some database windows cache the field values within the window when being displayed, it is only when the OK button is pressed that the values are copied into the drawing or layer. This member also provides access to values being displayed in an external database window.
- Returns:
The value of Values.
- Return type:
- reload_controls_using_table(table_name)¶
- Description:
Signals that any controls using a specific table will need to have their contents reloaded.
- Remarks:
When the script finishes, the DBW will automatically reload any controls using the table(s) specified. This will include controls such as Dynamic Lookups, Child list_views (containing Dynamic Lookup columns), and Check List type controls. Any existing values selected in the controls will be retained if possible.
- Parameters:
table_name (str) – Table name.