WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   running scripts without the IDE showing (https://forum.worldviz.com/showthread.php?t=81)

hotspur1 10-29-2003 09:13 AM

running scripts without the IDE showing
 
Is it possible to run a Vizard script from the command line

Vizard.exe -r myscript.py

and not have the splashscreen and/or the Vizard IDE pop up (or perhaps come up as minimized?)

farshizzo 10-29-2003 10:17 AM

Yeah, this is possible with version 2.12 and higher. Try this:

winviz.exe 0 myscript.py

winviz.exe is in the same directory as Vizard.exe. The first argument is a number, which you don't need to worry about, and the second argument is the path to the script, which should usually be the full path, not just the script name.

hotspur1 10-29-2003 12:30 PM

Hmmm....

I have downloaded v2.12 and tried out your suggestion without success...

The first time, I typed

"C:\Program Files\Vizard20\bin\winviz.exe" 0 simpleworld.py

and the 2nd time I changed directories to Vizard's bin directory and typed:

winviz.exe 0 N:\AndyL\PythonPractice\simpleworld.py

and both times I got the following error. (That's a zero as the second arg)

Vizard 2.12
Traceback (most recent call last):
File "", line 12 in ?
IOError: [Errno 2] No such file or directory: '0' (zero)
CameraGroup::_sync() : _syncBarrier not created cannot block

farshizzo 10-29-2003 12:45 PM

oops...my bad

I got it backwards, the first argument is the script and the second argument is the number, hope i didn't cause too much headache.

hotspur1 10-29-2003 07:29 PM

OK, swapping the arguments go it to launch ok, but I notice that the evaluation splash screen pops up even though I have a licensed copy of Vizard. Is there a way to fix this or make it go away?

Also, I had been passing some other arguments to my scripts via command line (see the thread 15 - "Passing arguments to Vizard"). Is this possible to do when calling winviz directly?

farshizzo 10-30-2003 09:56 AM

oops...another bad

I'll create a fix for that as soon as possible.

You should be able to pass arguments to your script. Just add them after the 0 and you can access them as usual in your script by using viz.args.

hotspur1 10-30-2003 10:17 AM

Thanks Farshid - appreciate all your help.

Just one other matter - I got a copy of the Release notes which shows an example of starting from the command line, but it doesn't include the final '0' - I guess the Release Notes should get corrected....

I also noted that after I run winviz in this way in the Command Window (Win2k), I cannot use the close button anymore to close the window! I have to go to the Task Manager to end the process...

farshizzo 10-30-2003 10:36 AM

Thanks for pointing that out.

About the command window, you'll have to take that up with Andy. Either way, you should be able to type "exit" to close it.


All times are GMT -7. The time now is 07:04 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC