Jump to content

Is Script executed in VW


Recommended Posts

I may be misunderstanding your question, but as you surmised, the VS library is not available outside of VW for execution.  If you are doing unit testing, you have to do it inside VW.  Fortunately, because Python compiles at run time, you don't have to re-build and re-start every time you make a coding change.  You do have to go through a couple hoops to prevent included modules from caching, but you can start by searching for discussions on this in the archive (they may actually be in the VectorScript section from when before the discussion threads split in two).

 

In terms of seeing the result of your testing, you have a few options.  You can always use a alert dialog, which is useful for quick tests, but is certainly not practical for a lot of output.  

You can write your results to a log file.  Python's built in file access and logging are far superior to VS calls, so use those.

If you call print() in your script, the results will appear in the error output window that will open after your script completes.  You will also see this window if your script experiences any runtime errors.

 

HTH,
Josh

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...