IWindow

class IWindow

Bases: ImpactCOMWrapperBase

Description:

Controls the properties of a drawing window.

Wraps a COM object or another wrapper instance. Accepts: - A valid impact_object - An existing impact_com_wrapper_base-derived instance

property drawing

Gets Drawing.

Description:

Returns an IDrawing object representing the drawing that is being displayed by this window.

Returns:

The value of Drawing.

Return type:

drawing (IDrawing)

property full_name

Gets full_name.

Description:

The name of this window.

Returns:

The value of full_name.

Return type:

full_name (str)

property view_settings

Gets view_settings.

Description:

Gets the view settings for the window.

Returns:

The value of view_settings.

Return type:

view_settings (IViewSettings)

property visible_face

Gets visible_face.

Description:

Sets and gets the visible face of the design.

Returns:

The value of visible_face.

Return type:

visible_face (ipFaceOrientation)

apply_saved_visibility(saved_visibility_m_t_s)
Description:

Applies a saved visibility to this window.

Parameters:

saved_visibility_mts (IMasterSetting) – Specifies the saved visibility to apply.

Examples:

close()
Description:

Closes this window.

repaint()
Description:

Repaints all entities in this window.

review()
Description:

Set the view of this window to the last view.

Remarks:

On executing this method the project is immediately redisplayed using the view you had prior to the current one. Repeating, you can return to earlier views in the reverse order that you used them.

save_to_file(file_name, file_format, width, height)
Description:

Saves the view of the window to an image file.

Remarks:

It is recommended that you use IWindow.save_to_file2 or IDrawing.save_drawing_as_image instead of this method.

Parameters:
  • file_name (str) – Specifies full path of the new file.

  • file_format (ipFileFormat) – Specifies the format in which to save the file. This can be one of the following values from the enumeration ipFileFormat: ffBitmap ffJPG ffPNG ffMetafile ffTIFF

  • width (int) – Specifies the width of the image (in pixels).

  • height (int) – Specifies the height of the image (in pixels).

Examples:

save_to_file2(file_name, file_format, image_format_params)
Description:

Saves the view of the window to an image file.

Remarks:

You may prefer to use IDrawing.save_drawing_as_image instead of this method, as it gives you more options.

Parameters:
  • file_name (str) – Specifies full path of the new file.

  • file_format (ipFileFormat) – Specifies the format in which to save the file. This can be one of the following values from the enumeration ipFileFormat: ffBitmap ffJPG ffPNG ffMetafile ffTIFF

  • image_format_params (IImageFormatParams) – Specifies the IImageFormatParams options for the new file.

Examples:

save_to_stream(file_format, image_format_params)
Description:

Saves the view of the window to an image stream.

Returns:

This method returns an IUnknown interface but the interface also supports the IStream interface.

Parameters:
  • file_format (ipFileFormat) – Specifies the format in which to save the file. This can be one of the following values from the enumeration ipFileFormat: ffBitmap ffJPG ffPNG ffMetafile ffTIFF

  • image_format_params (IImageFormatParams) – Specifies the IImageFormatParams options for the new file.

view_box(box)
Description:

Zooms into the specified rectangular area.

Remarks:

Note that the coordinates of the rectangle refer to world (layer) coordinate system, not block coordinates.

Parameters:

box (IRect) – Specifies the area in which to zoom.

Examples:

view_extents()
Description:

Zooms into the visible extents.

view_extents2(padding)
Description:

Zooms into the visible extents.

Remarks:

Introduced in Impact 6.1.0.30.

Parameters:

padding (float) – Specifies the amount of additional space which is appended to the shorter extent of a layer as a percentage. A Padding of “0%” appends no additional padding. A Padding of “100%” appends additional space to the shorter extent to give an equal width and height as given by view_extents.