GetDistance Example |
Using Programming Languages other than VBA
Sub Example_GetDistance() ' This example returns the distance entered by the user. Dim returnDist As Double Dim basePnt(0 To 2) As Double basePnt(0) = 0#: basePnt(1) = 0#: basePnt(2) = 0# ' Return the value entered by user. A prompt is provided. returnDist = ThisDrawing.Utility.GetDistance(, "Enter distance: ") MsgBox "The distance entered was " & returnDist & vbCrLf & _ "(Enter the next value without prompting.)", , "GetDistance Example" ' Return the value entered by user. No prompt is provided. returnDist = ThisDrawing.Utility.GetDistance() MsgBox "The distance entered was " & returnDist, , "GetDistance Example" ' Return the value entered by user. A base point and prompt are provided. returnDist = ThisDrawing.Utility.GetDistance(basePnt, "Enter a distance: ") MsgBox "The distance entered was " & returnDist, , "GetDistance Example" End Sub
Comments? |