AddRay Example

Using Programming Languages other than VBA

Sub Example_AddRay()
	' This example creates a ray in model space.

	Dim rayObj As AcadRay
	Dim basePoint(0 To 2) As Double
	Dim SecondPoint(0 To 2) As Double

	' Define the ray
	basePoint(0) = 3#: basePoint(1) = 3#: basePoint(2) = 0#
	SecondPoint(0) = 4#: SecondPoint(1) = 4#: SecondPoint(2) = 0#

	' Creates a Ray object in model space
	Set rayObj = ThisDrawing.ModelSpace.AddRay(basePoint, SecondPoint)
	ZoomAll

End Sub

 

   Comments?