pycatia.drafting_interfaces.drawing_sheet¶
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.drafting_interfaces.drawing_sheet.DrawingSheet(com_object)¶
Note
CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
System.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchSystem.AnyObjectDrawingSheetRepresents a drawing sheet of the drawing document.The drawing sheet is included in a drawing document and contains drawingviews.Warning: This interface is not available with 2D Layout for 3DDesign.- activate() None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub Activate()Activates the drawing sheet. Activating a drawing sheet means that thisdrawing sheet is the one on which the end user is now working. The window inthe application’s window collection which contains this drawing sheet becomesthe active one.Example:This example activates the MySheet drawing sheet.MySheet.Activate
- Return type:
None
- force_update() None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub ForceUpdate()Forces the update of all the drawing views of the drawing sheet. Thisupdate redraws all the views, whether their pointed objects have been modifiedsince the drawing sheet creation or last update or not. These pointed objectscan be CATIA Version 4 models, or CATIA Version 5 parts orassemblies.Warning: This method is not available with 2D Layout for 3DDesign.Example:This example forces the update of all the drawing views in the MySheetdrawing sheet.MySheet.ForceUpdate
- Return type:
None
- property gen_views_pos_mode: int¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property GenViewsPosMode() As CatSheetGenViewsPosModeReturns or sets the generative views position stabilitymode.Warning: This method is not available with 2D Layout for 3DDesign.Example:This example sets the stability mode of the MySheet drawing sheet sothat after an update, existing and unmodified geometries don’t moveglobally.MySheet.GenViewsPosMode = catFixedAxis
- Returns:
enum cat_sheet_gen_views_pos_mode
- Return type:
int
- generate_dimensions() None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub GenerateDimensions()Generates dimensions in all the drawing views of the drawing sheet. Thesedimensions are generated from the constraints of the pointed 3D part(s). Onedimension only is generated for a given constraint. Only dimensions for thefollowing constraints are generated: distance, length, angle, radius, anddiameter.Warning: This method is not available with 2D Layout for 3DDesign.Example:This example generates the dimensions for all the views in the MySheetdrawing sheet.MySheet.GenerateDimensions
- Return type:
None
- get_paper_height() float ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func GetPaperHeight() As doubleGets the paper width of the drawing sheet.Parameters:oPaperHeightExample:This example get the height of theDrawingSheet1.DrawingSheet1.GetPaperHeight oPaperHeight
- Return type:
float
- get_paper_width() float ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func GetPaperWidth() As doubleGets the paper width of the drawing sheet.Parameters:oPaperWidthExample:This example get the width of theDrawingSheet1.DrawingSheet1.GetPaperWidth oPaperWidth
- Return type:
float
- is_detail() bool ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func IsDetail() As booleanChecks whether the sheet is a detail sheet.Warning: This method is not available with 2D Layout for 3DDesign.TRUE if the sheet is a detail sheet.Example:This example checks whether MySheet is a detail sheet.IsDetail = MySheet.IsDetail
- Return type:
bool
- isolate() None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub Isolate()Isolates the drawing sheet.Warning: This method is not available with 2D Layout for 3DDesign.Example:This example isolates the MySheet drawing sheet.MySheet.Isolate
- Return type:
None
- property orientation: int¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property Orientation() As CatPaperOrientationReturns or sets the paper orientation.Example:This example sets the paper orientation for the MySheet drawing sheetto catPaperLandscape.MySheet.Orientation = catPaperLandscape
- Returns:
enum cat_paper_orientation
- Return type:
int
- property page_setup: DrawingPageSetup¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property PageSetup() As DrawingPageSetup (Read Only)Returns the page setup.Example:This example returns the page setup for the MySheet drawingsheet.Dim MySheetPageSetup As DrawingPageSetupSet MySheetPageSetup = MySheet.PageSetup
- Return type:
- property paper_size: int¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property PaperSize() As CatPaperSizeReturns or sets the paper size.Example:This example sets the page size for the MySheet drawing sheet tocatPaperA4.MySheet.PaperSize = catPaperA4
- Returns:
enum cat_paper_size
- Return type:
int
- property print_area: PrintArea¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property PrintArea() As PrintArea (Read Only)Returns the print area definition object.Example:This example returns the print area for the MySheet drawingsheet.Dim MyPrintArea As PrintAreaSet MyPrintArea = MySheet.PrintArea
- Return type:
- print_out() None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub PrintOut()Prints the drawing sheet according to its page setup on the defaultprinter.Warning: This method is not available with 2D Layout for 3DDesign.Example:This example prints the DrawingSheet1 on the defaultprinter.DrawingSheet1.PrintOut
- Return type:
None
- print_to_file(file_name: Path, overwrite=False) None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub PrintToFile(CATBSTR fileName)Prints the drawing sheet according its page setup in a file instead ofbeing sent to a printer.Parameters:fileNameThe full pathname of the file receiving the data.Warning: This method is not available with 2D Layout for 3D Design.Example:This example prints the DrawingSheet1 in a file.DrawingSheet1.PrintToFile “e://temp//sheet1.prn”
- Parameters:
file_name (Path) – file_name including full path.
overwrite (bool) – Files will not be overwritten unless is True.
- Return type:
None
- property projection_method: int¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property ProjectionMethod() As CatSheetProjectionMethodReturns or sets the sheet projection mode .Example:This example sets the projection mode of the MySheet drawing sheet tocatFirstAngle.MySheet.ProjectionMethod = catFirstAngle
- Returns:
enum cat_sheet_projection_method
- Return type:
int
- reorder_views(i_ordered_views: tuple) None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub reorder_Views(CATSafeArrayVariant iOrderedViews)Changes the positions of the views in this sheet according to the givenordered list. iOrderedViews is the result of a permutation applied to the listof all the views of this sheet with the following constraint: the two firstelements of the list must be respectively the sheet’s mainview and backgroundview.Example:This example modifies the views order of a sheet made of a mainview, abackgroundview and two user-created views. (user-created views areinverted).Set drwviewsorder = CATIA.ActiveDocument.Sheets.ActiveSheetSet drwviews = drwviewsorder.ViewsSet mainview = drwviews.item(1)Set backview = drwviews.item(2)Set view1 = drwviews.item(3)Set view2 = drwviews.item(4)newvieworder = Array(mainview, backview, view2, view1)drwviewsorder.reorder_Views(newvieworder)
- Parameters:
i_ordered_views (tuple) –
- Return type:
None
- property scale: float¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property Scale() As doubleReturns or sets the scale of the drawing sheet.Example:This example sets the scale of the MySheet drawing sheet to0.5.MySheet.Scale = 0.5
- Return type:
float
- property scale2: float¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property Scale2() As doubleReturns or sets the scale of the drawing sheet (Workaround for VBAkeyword).Example:This example sets the scale of the MySheet drawing sheet to0.5.MySheet.Scale2 = 0.5
- Return type:
float
- set_as_detail() None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub SetAsDetail()Sets the sheet as a detail sheet. You can now create views into this sheetthat will be taken as details. A detail is made to be reuse as dittos inviews.Warning: This method is not available with 2D Layout for 3DDesign.Example:This example changes the MySheet into a detail sheet.MySheet.SetAsDetail
- Return type:
None
- set_paper_height(o_paper_height: float) None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub SetPaperHeight(double oPaperHeight)Sets the paper width of the drawing sheet, available on userformat.Parameters:iPaperHeightExample:This example set the height of theDrawingSheet1.DrawingSheet1.PaperSize = catPaperUserDrawingSheet1.SetPaperHeight iPaperHeight
- Parameters:
o_paper_height (float) –
- Return type:
None
- set_paper_width(o_paper_width: float) None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub SetPaperWidth(double oPaperWidth)Sets the paper width of the drawing sheet, available on userformat.Parameters:iPaperWidthExample:This example set the width of theDrawingSheet1.DrawingSheet1.PaperSize = catPaperUserDrawingSheet1.SetPaperWidth iPaperWidth
- Parameters:
o_paper_width (float) –
- Return type:
None
- update() None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub Update()Updates the drawing views of the drawing sheet. This update redraws all theviews whose pointed objects have been modified since the drawing sheet creationor last update, but do not redraw the views whose pointed have not beenmodifed. These pointed objects can be CATIA Version 4 models, or CATIA Version5 parts or assemblies.Warning: This method is not available with 2D Layout for 3DDesign.Example:This example updates the drawing views in the MySheet drawingsheet.MySheet.Update
- Return type:
None
- property views: DrawingViews¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property Views() As DrawingViews (Read Only)Returns the drawing view collection of the drawing sheet.Warning: This method is not available with 2D Layout for 3DDesign.Example:This example retrieves in ViewCollection the collection of views of theMySheet drawing sheet.Dim ViewCollection As DrawingViewsSet ViewCollection = MySheet.Views
- Return type: