GetOrientation Example

Using Programming Languages other than VBA

Sub Example_GetOrientation()
	' This example uses the GetOrientation method to demonstrate three different ways to retrieve
	' an orientation from the user.

	Dim retOrientation As Double

	' Return the Orientation in radians with a prompt
	retOrientation = ThisDrawing.Utility.GetOrientation(, "Enter an Orientation: ")
	MsgBox "The Orientation entered was " & retOrientation & vbCrLf & _
			"(Enter the next value without prompting.)", , "GetOrientation Example"

	' Return the Orientation in radians without any prompt
	retOrientation = ThisDrawing.Utility.GetOrientation()
	MsgBox "The Orientation entered was " & retOrientation, , "GetOrientation Example"

	' Return the Orientation in radians with a prompt and an Orientation base point
	Dim basePnt(0 To 2) As Double
	basePnt(0) = 2#: basePnt(1) = 2#: basePnt(2) = 0#
	retOrientation = ThisDrawing.Utility.GetOrientation(basePnt, "Enter an Orientation: ")
	MsgBox "The Orientation entered was " & retOrientation, , "GetOrientation Example"
	
End Sub

 

   Comments?