pycatia.in_interfaces.window

Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-07-06 14:02:20.222384

Warning

The notes denoted “CAA V5 Visual Basic Help” are to be used as reference only. They are there as a guide as to how the visual basic / catscript functions work and thus help debugging in pycatia.

class pycatia.in_interfaces.window.Window(com_object)

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.AnyObject
Window

Represents the window.
The window is the object that accommodates one or several viewers to display
your objects, and which makes the link with the windowing
system.
activate() None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub Activate()

Activates a window. The active window is deactivated and the window to
which the method applies is activated instead.

Example:
This example activates the CADWindow window.

CADWindow.Activate()
Return type:

None

activate_next() None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub ActivateNext()

Activates the window following the current active one in the window
collection.

Example:
This example activates the window following the current CADWindow
window in the window collection.

CADWindow.ActivateNext()
Return type:

None

activate_previous() None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub ActivatePrevious()

Activates the window preceding the current active one in the window
collection.

Example:
This example activates the window preceding the current CADWindow
window in the window collection.

CADWindow.ActivatePrevious()
Return type:

None

property active_viewer: Viewer

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property ActiveViewer() As Viewer (Read Only)

Returns the active viewer in the window.

Example:
This example retrieves the active viewer in the CADWindow window in
ViewerToWorkIn.

Dim ViewerToWorkIn As Viewer
Set ViewerToWorkIn = CADWindow.ActiveViewer
Return type:

Viewer

property caption: str

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property Caption() As CATBSTR

Returns or sets the window caption. The window caption is displayed in the
title bar.

Example:
This example sets the window caption for the CADWindow window to: CAD
3D Window.

CADWindow.Caption = “CAD 3D Window”
Return type:

str

close() None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub Close()

Closes the window. This method displays the dialog box requesting whether
to save the file if the document was modified, except if the
Application.DisplayFileAlerts property was previously set to
False.

Example:
This example closes the CADWindow window.

CADWindow.Close()
Return type:

None

property height: int

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property Height() As long

Returns or sets the window height. The window height is expressed in
pixels.

Example:
This example sets the window height for the CADWindow window to 300
pixels.

CADWindow.Width = 300
Return type:

int

property left: int

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property Left() As long

Returns or sets the distance of the window with respect to the inner left
side of the frame. This distance is expressed in pixels.

Example:
This example sets the distance of the window with respect to the inner
left side of the frame for the CADWindow window to 150
pixels.

CADWindow.Left = 150
Return type:

int

new_window() Window

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Func NewWindow() As Window

Creates a new window. The new window displays the same document with the
same viewers and viewpoints than the window to which the method applies, and
becomes the active one.

Example:
This example creates a new window named CADNewWindow from the CADWindow
window.

Dim CADNewWindow As Window
Set CADNewWindow = CADWindow.NewWindow()
Return type:

Window

property page_setup: PageSetup

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property PageSetup() As PageSetup

Returns or sets the page setup of the window. The page setup includes all
parameters to print the window.

Example:
This example sets the page setup for the CADWindow window to an
existing page setup for the A4 paper size A4PageSetup.

CADWindow.PageSetup = A4PageSetup
Return type:

PageSetup

print_out() None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub PrintOut()

Prints the active viewer of the window according to the window’s page setup
on the default printer.

Example:
This example prints the CADWindow window’s active viewer on the default
printer.

CADWindow.PrintOut()
Return type:

None

print_to_file(file_name: str) None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub PrintToFile(CATBSTR fileName)

Prints the active viewer of the window according to the window’s page setup
in a file instead of being sent to a printer.

Parameters:

fileName
The full pathname of the file receiving the data.

Example:
This example prints the CADWindow window’s active viewer in a
file.

CADWindow.PrintToFile(“e:tempcadwin.prn”)
Parameters:

file_name (str) –

Return type:

None

property top: int

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property Top() As long

Returns or sets the distance of the window with respect to the inner top
side of the frame. This distance is expressed in pixels.

Example:
This example sets the distance of the window with respect to the inner
top side of the frame for the CADWindow window to 50
pixels.

CADWindow.Top = 50
Return type:

int

property viewers: Viewers

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property Viewers() As Viewers (Read Only)

Returns the collection of viewers attached to the window.

Example:
This example retrieves the collection of viewers attached to the
CADWindow window in ViewerCollection.

Dim ViewerCollection As Viewers
Set ViewerCollection = CADWindow.Viewers
Return type:

Viewers

property width: int

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property Width() As long

Returns or sets the window width. The window width is expressed in
pixels.

Example:
This example sets the window width for the CADWindow window to 450
pixels.

CADWindow.Width = 450
Return type:

int

property window_state: int

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property WindowState() As CatWindowState

Returns or sets the window state.

Example:
This example sets the window state for the CADWindow window to
catWindowStateMaximized.

CADWindow.WindowState = catWindowStateMaximized
Returns:

enum cat_window_state

Return type:

int