Santa123
Mechanical
- Oct 2, 2006
- 80
Hej,
I am trying to convert my macro from script to vb.net
and after typing MyGeomElementLine I dont have method GetDirection.
Regards
Santa
I am trying to convert my macro from script to vb.net
Code:
Function FuncIsHorizontal(MyPart As Part, i) As Boolean
Dim MyDir() As Variant
Dim MyGeomElementLine As GeometricElement
Set MyGeomElementLine = MyPart.Bodies.Item("PartBody").Sketches.Item(1).Constraints.Item(i).GetConstraintElement(1)
ReDim MyDir(2)
MyGeomElementLine.GetDirection MyDir
If MyDir(0) = 1 And MyDir(1) = 0 Or MyDir(0) = -1 And MyDir(1) = 0 Then
FuncIsHorizontal = True
Else
FuncIsHorizontal = False
End If
End Function
and after typing MyGeomElementLine I dont have method GetDirection.
Regards
Santa