Jump to content
Developer Wiki and Function Reference Links ×

vs.GetPt


relume

Recommended Posts

Hello

In python the behavior of vs.GetPt is very different as in vectroscript. Calling vs.GetPt(callback) in python executes all following statements without waiting for the end of the called callback-function:

def callback(pt)
  vMessage = 'X/Y : ' + str(pt[0]) + '/' + str(pt[1])
  vs.AlrtDialog(vMessage)

vs.DSelectAll()
vs.GetPt(callback)
vs.AlrtDialog('the end')

This means in this example that the message "the end" is shown before the message "X/Y ..." is shown from the callback-function "callback".

Is there any way to get the result of vs.GetPt function back to the calling level where it can be processed successively, as it is some bit "strange" to write "main" code into the callback-function of vs.GetPt?

Many thanks

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...