z Property
Description
Property type
Syntax
Visual Basic |
---|
Public Property z As Double |
Example
Private Sub IntersectWith_Example()
' This example creates two lines and finds the points at
' which they intersect.
' Create the lines
Dim myLine1 As IntelliCAD.Line
Dim myLine2 As IntelliCAD.Line
Set myDoc = Application.ActiveDocument
Set myLine1 = myDoc.ModelSpace.AddLine(Library.CreatePoint(4, 4), Library.CreatePoint(7, 1))
myLine1.Update
Set myDoc = Application.ActiveDocument
Set myLine2 = myDoc.ModelSpace.AddLine(Library.CreatePoint(5, 2), Library.CreatePoint(8, 4))
myLine2.Update
' Find the intersection point.
Dim intPoints As points
Set intPoints = myLine1.IntersectWith(myLine2, vicExtendNone)
MsgBox "Intersection point: " & Chr(13) & Chr(13) & "x = " & intPoints.Item(0).x & Chr(13) & "y = " & intPoints.Item(0).y & Chr(13) & "z = " & intPoints.Item(0).z
End Sub