AddVectors method example

Private Sub AddVectorsExample()

     ' This example creates two vectors and adds them together.

     ' It then subtracts them and displays the result.

     Dim icadDoc As IntelliCAD.Document

     Set icadDoc = ActiveDocument

     Dim Vect1 As Vector

     Dim Vect2 As Vector

     Dim Vect3 As Vector

     Dim Vect4 As Vector

     Set Vect1 = Library.CreateVector(0, 0, 0, 1, 1, 0)

     Set Vect2 = Library.CreateVector(0, 0, 0, 2, 1, 0)

     Set Vect3 = Library.AddVectors(Vect1, Vect2)

     Set Vect4 = Library.SubtractVectors(Vect1, Vect2)

     MsgBox "Properties of vector sum:" & Chr(13) & Vect3.x & ", " & Vect3.y & ", " & Vect3.z

     MsgBox "Properties of vector difference:" & Chr(13) & Vect4.x & ", " & Vect4.y & ", " & Vect4.z

End Sub