pycatia.dnb_device_interfaces.home_position¶
Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-09-25 14:34:21.593357
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.dnb_device_interfaces.home_position.HomePosition(com_object)¶
Note
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
System.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchSystem.AnyObjectHomePositionInterface representing a device’s Home Position.Role: This interface is used to interact with a device’s home positions. Thisincludes devices created in using V5 mechanisms or imported from DENEBD5.A home position is a list of values, each value being associated to eachDegrees Of Freedom(DOF) of the device, defining a state for the device (Thelist size matches the number of commands that can besimulated).With home positions, it is possible to define Tool tips. A Tool tip is aspecific device part meant to be in contact with product(s). User may definesome device parts as tool tips so that, when they are in collision, the clashis ignored. Tool tips are excluded from clash analysis in tools like DPMBody-in-White’s weldgun search.The following code snippet can be used to obtain a home position from adevice.Dim objDevice As BasicDeviceset objDevice = CATIA.ActiveDocument.Product.GetTechnologicalObject(“BasicDevice”)Dim ListOfHomePositions()objDevice.GetHomePositions ListOfHomePositionsDim homePos as HomePositionFor Each homePos In ListOfHomePositions…Next- get_associated_tool_tip(o_tip_list: tuple) Product ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub GetAssociatedToolTip(CATSafeArrayVariant oTipList)Get the tooltips associated with the home position.Parameters:oTipListThis out parameter contains list of tooltips associated with thehome position. The list contains a set of device parts.Example:‘ declaration of 1 list of products and 1 homepositionDim MyToolTips() As ProductDim MyHomePosition As HomePosition‘ valuation of variablesSet MyHomePosition = …‘ retrieval of tool tips as part of product arrayMyHomePosition.GetAssociatedToolTip( MyToolTips )‘ start a loop displaying the name of each tool tipFor Each toolTip In toolTips‘warning: MsgBox is a modal dialog: it requires userinteractions!!MsgBox toolTip.PartNumber = …Next
- Parameters:
o_tip_list (tuple) –
- Return type:
- get_dof_values(o_values: tuple) None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub GetDOFValues(CATSafeArrayVariant oValues)Get the DOF values for the home position.Parameters:oValuesThis contains a list of the current DOF values. Please note thatvalues are expressed as:meters for length valuesradians for angle valuesangles in radians.Example:Dim objDevice As BasicDeviceset objDevice = CATIA.ActiveDocument.Product.GetTechnologicalObject(“BasicDevice”)Dim ListOfHomePositions()objDevice.GetHomePositions ListOfHomePositionsDim homePos as HomePosition‘define an empty array to store the valuesDim DOFValues ()For Each homePos In ListOfHomePositionshomePos.GetDOFValues DOFValuesFor i = 0 to ubound (DOFValues)…NextNext
- Parameters:
o_values (tuple) –
- Return type:
None
- set_associated_tool_tip(i_tip_list: tuple) Product ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub SetAssociatedToolTip(CATSafeArrayVariant iTipList)Set the tool tip associated with the home position.Parameters:iTipListThis parameter contains list of associated tooltips (device partsmeant to be ignored during clash analysis).Example:‘ declaration of 2 products and 1 home positionDim MyPart1 As ProductDim MyPart2 As ProductDim MyHomePosition As HomePosition‘ valuation of variablesSet MyPart1 = …Set MyPart2 = …Set MyHomePosition = …‘ defining the tool tips through an arrayDim MyToolTips(1) As ProductSet MyToolTips(0) = MyPart1Set MyToolTips(1) = MyPart2MyHomePosition.SetAssociatedToolTip( MyToolTips )
- Parameters:
i_tip_list (tuple) –
- Return type:
- set_dof_values(i_values: tuple) None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub SetDOFValues(CATSafeArrayVariant iValues)Set the DOF values for the home position.Parameters:oValuesThis contains a list of the current DOF values. Please note thatvalues are expressed as:meters for length valuesradians for angle valuesExample:Dim DOFValues (6)For i = 0 to 5‘Store value in radiansDOFValues(i) = 10 * i * (pi / 180.0)next‘Note: to obtain homePos, please refer to example inGetDOFValueshomePos.SetDOFValues DOFValues
- Parameters:
i_values (tuple) –
- Return type:
None