Author Topic: continue picking points  (Read 1889 times)

0 Members and 1 Guest are viewing this topic.

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
continue picking points
« on: June 11, 2007, 04:35:54 PM »
Im looking for a very simple example of using while or Do While to pick points til user hits enter to stop.  I tried using
Code: [Select]
While Not Pt2 = Nulland every variation I could think of, but couldn't get it.  Im sure its simple, I just cant get it.

thanks
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

Fatty

  • Guest
Re: continue picking points
« Reply #1 on: June 11, 2007, 05:27:43 PM »
I've used this one

~'J'~

Code: [Select]
'' written by Tony Tanzillo
'' request check "Break on Unhandled Errors" in  General options
Public Sub LoopExample()
Dim Msg As String
Msg = vbCrLf & "First point: "
Dim MyPoint As Variant
Do
On Error Resume Next
MyPoint = ThisDrawing.Utility.GetPoint(, Msg)
If Err Then
Err.Clear
Exit Do
End If
On Error GoTo 0

' Process the entered point here
ThisDrawing.ModelSpace.AddCircle MyPoint, 10#
Msg = vbCrLf & "Next point or ENTER to exit: "
Loop
On Error GoTo 0

End Sub

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: continue picking points
« Reply #2 on: June 11, 2007, 05:42:28 PM »
Thats what I was looking for.  thanks
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

Fatty

  • Guest
Re: continue picking points
« Reply #3 on: June 13, 2007, 09:48:07 AM »
Thanks to Tony :)

~'J'~