pycatia.drafting_interfaces.drawing_components¶
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_components.DrawingComponents(com_object)¶
Note
CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
System.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchSystem.CollectionDrawingComponentsA collection of all the drawing components (ditto) currently managed by adrawing view of drawing sheet in a drawing document.- add(i_drawing_component_ref: DrawingView, i_position_x: float, i_position_y: float) DrawingComponent ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func Add(DrawingView iDrawingComponentRef,double iPositionX,double iPositionY) As DrawingComponentCreates a drawing component instance and adds it to the DrawingComponentscollection.Parameters:iDrawingComponentRefThe view (i.e. the detail) that is the component reference . Thisview also called a detail MUST belong to a sheet of component references (i.e.details)iPositionX,iPositionYThe drawing component x and y coordinates, expressed inmillimeters, with respect to the drawing view coordinate systemReturns:The created drawing component instanceExample:The following example creates a drawing component instance with a givencomponent reference MyComponentRef coming from a Sheet of component references(i.e. details) SheetComponentRef and retrieved in MyComponentInst in thedrawing view collection of the MyView drawing view. This view belongs to thedrawing view collection of the drawing sheetDim MyComponentRef As DrawingViewSet MyComponentRef = SheetComponentRef.Views.Item(1)Dim MyView As DrawingViewSet MyView = MySheet.Views.ActiveViewDim MyComponentInst As DrawingComponentSet MyComponentInst = MyView.Components.Add(MyComponentRef, 100., 50.)
- Parameters:
i_drawing_component_ref (DrawingView) –
i_position_x (float) –
i_position_y (float) –
- Return type:
- item(i_index: cat_variant) DrawingComponent ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func Item(CATVariant iIndex) As DrawingComponentReturns a drawing component instance using its index or its name from theDrawingComponents collection.Parameters:iIndexThe index or the name of the drawing component instance to retrievefrom the collection of drawing components. As a numerics, this index is therank of the drawing component instance in the collection. The index of thefirst drawing component instance in the collection is 1, and the index of thelast drawing component instance is Count. As a string, it is the name youassigned to the drawing component instance using theAnyObject.Name propertyReturns:The retrieved drawing component instanceExample:This example retrieves in ThisDrawingComponent the second drawing componentinstance, MyView in the drawing view collection of the active sheet in theactive document, supposed to be a drawing document.Dim MySheet As DrawingSheetSet MySheet = CATIA.ActiveDocument.Sheets.ActiveSheetDim MyView As DrawingViewSet MyView = MySheet.Views.ActiveViewDim ThisDrawingComponent As DrawingComponentSet ThisDrawingComponent = MyView.Components.Item(2)
- Parameters:
i_index (cat_variant) –
- Return type:
- remove(i_index: cat_variant) None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub Remove(CATVariant iIndex)Removes a drawing component from the DrawingComponentscollection.Parameters:iIndexThe index of the drawing component to remove from the collection ofdrawing components. As a numerics, this index is the rank of the drawingcomponent in the collection. The index of the first drawing component instancein the collection is 1, and the index of the last drawing component instance isCount. As a string, it is the name you assigned to the drawing component usingtheAnyObject.Name propertyExample:The following example removes the third drawing component instance in thedrawing component collection of the active view of the active document,supposed to be a drawing document.Dim MyView As DrawingViewSet MyView = MySheet.Views.ActiveViewMyView.Components.Remove(3)
- Parameters:
i_index (cat_variant) –
- Return type:
None