InfInterfaces Window (Object)
All Frameworks Object Hierarchy This Framework Indexes
Window (Object)
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.
Property Index
ActiveViewer
Returns the active viewer in the window.
Caption
Returns or sets the window caption.
Height
Returns or sets the window height.
Left
Returns or sets the distance of the window with respect to the inner
left side of the frame.
PageSetup
Returns or sets the page setup of the window.
Top
Returns or sets the distance of the window with respect to the inner
top side of the frame.
Viewers
Returns the collection of viewers attached to the window.
Width
Returns or sets the window width.
WindowState
Returns or sets the window state.
Method Index
ActivateNext
Activates the window following the current active one in the window
collection.
ActivatePrevious
Activates the window preceding the current active one in the window
collection.
Activate
Activates a window.
Close
Closes the window.
NewWindow
Creates a new window.
PrintOut
Prints the active viewer of the window according to the window's
page setup on the default printer.
PrintToFile
Prints the active viewer of the window according to the window's
page setup in a file instead of being sent to a printer.
Properties
o Property ActiveViewer ( ) As (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
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"
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
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
o Property PageSetup ( ) As
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
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
o Property Viewers ( ) As (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
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
o Property WindowState ( ) As
Returns or sets the window state.
Example:
This example sets the window state for the CADWindow
window to catWindowStateMaximized .
CADWindow.WindowState = catWindowStateMaximized
Methods
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 ()
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 ()
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 ()
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 ()
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 ()
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 ()
o Sub PrintToFile ( 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:\temp\cadwin.prn")
Copyright © 2003, Dassault Systèmes. All rights reserved.