







IntelliCAD 11.1 Object Library | |
CreateVector Method | |
See Also |
![]() |
- X2
- The x coordinate of the second vector point.
- Y2
- The y coordinate of the second vector point.
- Z2
- The z coordinate of the second vector point.
- X1
- The x coordinate of the first vector point.
- Y1
- The y coordinate of the first vector point.
- Z1
- The z coordinate of the first vector point.
Library Object : CreateVector Method |
Description
Returns a Vector object based on (X2-X1), Y2-Y1), (Z2-Z1). X1,Y1,Z1 default to 0,0,0.
Syntax
Parameters
- X2
- The x coordinate of the second vector point.
- Y2
- The y coordinate of the second vector point.
- Z2
- The z coordinate of the second vector point.
- X1
- The x coordinate of the first vector point.
- Y1
- The y coordinate of the first vector point.
- Z1
- The z coordinate of the first vector point.
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