This is a sample, how you can work with OrientedBox of part in assembly context
Sub Main()
Dim asm As AssemblyDocument = ThisDoc.Document
Dim asmDef As AssemblyComponentDefinition = asm.ComponentDefinition
Dim partOcc As ComponentOccurrence = asmDef.Occurrences(1)
Dim partDef As PartComponentDefinition = partOcc.Definition
Dim orientedBox As OrientedBox = partDef.OrientedMinimumRangeBox
PrintBoxData(orientedBox, "In part")
TransformBy(orientedBox, partOcc.Transformation)
PrintBoxData(orientedBox, "In assembly")
End Sub
Private Sub TransformBy(orientedBox As OrientedBox, matrix As Matrix)
Dim cornerPoint As Point
Dim directionOne As Vector
Dim directionTwo As Vector
Dim directionThree As Vector
orientedBox.GetOrientedBoxData(cornerPoint, directionOne, directionTwo, directionThree)
cornerPoint.TransformBy(matrix)
directionOne.TransformBy(matrix)
directionTwo.TransformBy(matrix)
directionThree.TransformBy(matrix)
orientedBox.PutOrientedBoxData(cornerPoint, directionOne, directionTwo, directionThree)
End Sub
Private Sub PrintBoxData(orientedBox As OrientedBox, Optional title As String = "")
Dim stringBuilder As New System.Text.StringBuilder
stringBuilder.AppendLine(title)
stringBuilder.AppendLine(String.Format("CornerPoint{3}[{0:N2}, {1:N2}, {2:N2}]", orientedBox.CornerPoint.X, orientedBox.CornerPoint.Y, orientedBox.CornerPoint.Z, vbTab))
stringBuilder.AppendLine(String.Format("DirectionOne{3}[{0:N2}, {1:N2}, {2:N2}]", orientedBox.DirectionOne.X, orientedBox.DirectionOne.Y, orientedBox.DirectionOne.Z, vbTab))
stringBuilder.AppendLine(String.Format("DirectionTwo{3}[{0:N2}, {1:N2}, {2:N2}]", orientedBox.DirectionTwo.X, orientedBox.DirectionTwo.Y, orientedBox.DirectionTwo.Z, vbTab))
stringBuilder.AppendLine(String.Format("DirectionThree{3}[{0:N2}, {1:N2}, {2:N2}]", orientedBox.DirectionThree.X, orientedBox.DirectionThree.Y, orientedBox.DirectionThree.Z, vbTab))
Logger.Debug(stringBuilder.ToString())
End Sub