pycatia.in_interfaces.viewer¶
Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-06-11 12:40:47.360445
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.viewer.Viewer(com_object)¶
Note
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
System.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchSystem.AnyObjectViewerRepresents the viewer.The viewer is the object that makes your objects display on thescreen.- activate() None ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Sub Activate()Activates the viewer in the window.Example:This example activates Viewers(1) in the windowMyWindow.MyWindow.Viewers(1).Activate()
- Return type:
None
- capture_to_file(i_format: int, i_file: str) None ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Sub CaptureToFile(CatCaptureFormat iFormat,CATBSTR iFile)Captures the actually displayed scene by the viewer as an image, and storesthe image in a file. Clipped parts of the scene are also clipped in thecaptured image. Images can be captured as CGM, EMF, TIFF, TIFF Greyscale, BMP,and JPEG images.Parameters:iFormatThe format in which the image will be creatediFileThe full pathname of the file into which you want to store thecaptured imageExample:This example captures the displayed part of the MyViewer viewer asa BMP image, and stores it in the e:MyImage.bmpfile.MyViewer.CaptureToFile catCaptureFormatBMP, “e:MyImage.bmp”
- Parameters:
i_format (int) – enum cat_capture_format
i_file (str) –
- Return type:
None
- property full_screen: bool¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
- o Property FullScreen() As booleanReturns or sets the state of a viewer to occupy the wholescreen.True if the viewer occupies the whole screen.Example:This example retrieves in IsFullScreen whether the MyViewer vieweroccupies the whole screen.IsFullScreen = MyViewer.FullScreen
- Return type:
bool
- get_background_color() tuple ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Sub GetBackgroundColor(CATSafeArrayVariant color)Gets the viewer’s background color. The color is expressed in the RGB colormode, as a triplet of coordinates ranging from 0 to 1 for the red, green, andblue colors respectively.Example:This example gets the background color of the MyViewerviewer.Dim color(2)MyViewer.GetBackgroundColor color
- Return type:
tuple
- property height: int¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
- o Property Height() As long (Read Only)Returns the viewer’s height, in pixels.Example:This example retrieves the height of the MyViewerviewer.h = MyViewer.Height
- Return type:
int
- new_camera() Camera ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Func NewCamera() As CameraCreates a new camera from the viewpoint of the viewer.Example:This example creates the MyCamera new camera by using the currentviewpoint of the MyViewer viewer.Dim MyCamera As CameraSet MyCamera = MyViewer.NewCamera()
- Return type:
- put_background_color(color: tuple) None ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Sub PutBackgroundColor(CATSafeArrayVariant color)Sets the viewer’s background color. The color is expressed in the RGB colormode, as a triplet of coordinates ranging from 0 to 1 for the red, green, andblue colors respectively.Example:This example sets the background color of the MyViewer viewer to blue,that is the color with (0.,0.,1.) coordinatesMyViewer.PutBackgroundColor Array(0, 0, 1)
- Parameters:
color (tuple) –
- Return type:
None
- reframe() None ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Sub Reframe()Reframes the viewer’s contents (Fits all in). Reframing means that theviewer’s contents is zoomed in or out to enable every object of the scene to bedisplayed in such a way that most of the space available in the viewer is used,just leaving a thin empty strip around the scene.Example:This example reframes the contents of the MyViewerviewer.MyViewer.Reframe()
- Return type:
None
- update() None ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Sub Update()Updates the viewer’s contents. Since the viewer is not automaticallyupdated after a viewpoint modification (for performance reasons), it must beexplicitely redrawn when needed.Example:This example updates the contents of the MyViewerviewer.MyViewer.Update()
- Return type:
None
- property width: int¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
- o Property Width() As long (Read Only)Returns the viewer’s width, in pixels.Example:This example retrieves the width of the MyViewerviewer.w = MyViewer.Width
- Return type:
int
- zoom_in() None ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Sub ZoomIn()Zooms in the viewer’s contents.Example:This example zooms in the contents of the MyViewerviewer.MyViewer.ZoomIn()
- Return type:
None
- zoom_out() None ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Sub ZoomOut()Zooms out the viewer’s contents.Example:This example zooms out the contents of the MyViewerviewer.MyViewer.ZoomOut()
- Return type:
None