pycatia.drafting_interfaces.drawing_component¶
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_component.DrawingComponent(com_object)¶
Note
CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
System.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchSystem.AnyObjectDrawingComponentRepresents a drawing component instance (ditto) in a drawingview.- property angle: float¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property Angle() As doubleReturns or sets the angle of the drawing component instance. The angle isgiven in the axis system of the drawing view The angle is measured in radiansand is counted counterclockwise.Example:This example sets the angle of the MyComponent drawing componentinstance to 90 degrees clockwise. You first need to compute the angle inradians and set the minus sign to indicate the rotation isclockwise.PI = 3.1415926535Angle90Clockwise = -PI/2MyComponent.Angle = Angle90Clockwise
- Return type:
float
- property comp_ref: DrawingView¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property CompRef() As DrawingView (Read Only)Returns the component reference of this drawing component instance. this isa CATIADrawingViewExample:This example gets the drawing component reference of the MyComponentdrawing component instance.Dim ComponentRef As DrawingViewSet ComponentRef = MyComponent.CompRef
- Return type:
- explode() None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub Explode()Explodes the drawing component instance (every sub elements of the drawingcomponent are created). Note: The drawing component is not removed by ExplodemethodExample:This example Explodes the MyComponent drawing component instance andremoves it.MyComponent.ExplodeSet MySelection = CATIA.ActiveDocument.SelectionMySelection.clearMySelection.add MyComponentMySelection.delete
- Return type:
None
- explode_and_select() None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub ExplodeAndSelect()Explodes the drawing component instance (every sub elements of the drawingcomponent are created) and put created sub elements in selectionset.Example:This example Explodes the MyComponent drawing componentinstance.MyComponent.ExplodeAndSelect
- Return type:
None
- expose_comp_ref() None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub ExposeCompRef()Exposes the component reference of this drawing component instance in a newdetail sheet.Example:This example exposes the component reference of the MyComponent drawingcomponent instance in a new detail sheet.MyComponent.ExposeCompRef
- Return type:
None
- expose_comp_ref_in_sheet(i_sheet: DrawingSheet) None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub ExposeCompRefInSheet(DrawingSheet iSheet)Exposes the component reference of this drawing component instance in aspecific detail sheet.Parameters:iSheetThe drawing sheet where the reference component has to be exposed.This sheet has to be a detail sheet, if not the component reference will beplaced in a new detail sheet.Example:This example exposes the component reference of the MyComponentdrawing component instance in the MyDetailSheet drawingsheet.MyComponent.ExposeCompRefInSheetMyDetailSheet
- Parameters:
i_sheet (DrawingSheet) –
- Return type:
None
- flip() None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub Flip()Flips the drawing component instance around X axis To flip around Y axisyou have to flip the component around X and to add a rotation of 180degrees.Example:This example Flips the MyComponent drawing componentinstance.MyComponent.Flip
- Return type:
None
- get_flip() bool ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func GetFlip() As booleanReturns the flip state of a drawing component instance around Xaxis.Example:This example Get the flip info of the MyComponent drawing componentinstance.IsFlipped = MyComponent.GetFlip
- Return type:
bool
- get_matrix(io_matrix: tuple) None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub GetMatrix(CATSafeArrayVariant ioMatrix)Gets the matrix of the drawing component instance. This matrix enables youto define the position (index 4 and 5 of the matrix) and the scale, the angleand the flip (index 0,1,2 and 3) of the drawing component instance at the sametime.Parameters:ioMatrix[0]The 1st coordinate of the first vectorioMatrix[1]The 2nd coordinate of the first vectorioMatrix[2]The 1st coordinate of the second vectorioMatrix[3]The 2nd coordinate of the second vectorioMatrix[4]The x value of the translation vectorioMatrix[5]The y value of the translation vector
- Parameters:
io_matrix (tuple) –
- Return type:
None
- get_modifiable_object(i_index: cat_variant) AnyObject ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func GetModifiableObject(CATVariant iIndex) As AnyObjectGets a modifiable object by index or name in this drawing componentinstance.Example:This example Gets the first modifiable object in the MyComponentdrawing component instance.Object = MyComponent.GetModifiableObject(1)
- Parameters:
i_index (cat_variant) –
- Return type:
- get_modifiable_objects_count() int ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func GetModifiableObjectsCount() As longGets the number of modifiable objects in this drawing componentinstance.Example:This example Gets the number of modifiable objects in MyComponentdrawing component instance.Count = MyComponent.GetModifiableObjectsCount
- Return type:
int
- 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 component instance (Workaround forVBA keyword).Example:This example sets the scale of the MyComponent drawing componentinstance to 0.5.MyComponent.Scale2 = 0.5
- Return type:
float
- set_matrix(i_matrix: tuple) None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub SetMatrix(CATSafeArrayVariant iMatrix)Sets the matrix of the drawing component instance. This matrix enables youto define the position (index 4 and 5 of the matrix) and the scale, the angleand the flip (index 0,1,2 and 3) of the drawing component instance at the sametime.Parameters:ioMatrix[0]The 1st coordinate of the first vectorioMatrix[1]The 2nd coordinate of the first vectorioMatrix[2]The 1st coordinate of the second vectorioMatrix[3]The 2nd coordinate of the second vectorioMatrix[4]The x value of the translation vectorioMatrix[5]The y value of the translation vector
- Parameters:
i_matrix (tuple) –
- Return type:
None
- property x: float¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property x() As doubleReturns or sets the x coordinate of the drawing component instanceposition. It is expressed with respect to the view coordinate system. Thiscoordinate, like any length, is measured in millimeters.Example:This example sets the x coordinate of the position of the MyComponentdrawing component instance to 5 inches. You need first to convert the 5 inchesinto millimeters.NewXCoordinate = 5*25.4MyComponent.x = NewXCoordinate
- Return type:
float
- property y: float¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property y() As doubleReturns or sets the y coordinate of the drawing component instanceposition. It is expressed with respect to the view coordinate system. Thiscoordinate, like any length, is measured in millimeters.Example:This example sets the y coordinate of the position of the MyComponentdrawing component instance to 5 inches. You need first to convert the 5 inchesinto millimeters.NewYCoordinate = 5*25.4MyComponent.y = NewYCoordinate
- Return type:
float