Vegas.ProjectOpen() always returns true

rcampbel wrote on 6/28/2004, 9:53 AM
I was trying to use the return value of Vegas.ProjectOpen(filename) which according to the API doc is a Boolean to determine if the project file was valid and opened. However, it appears that this always returns true in both Vegas 4.0e. If I give it a file argument that exists, but is not a Vegas file, Vegas will display a warning dialog, but ProjectOpen will return true.

I was trying to use this in Vegas 4 to detect if the user tried to open a Vegas 5 file. Any other way to do this?

In Vegas 5.0b, false is returned, unless the file is a type that Vegas can open. For example, during my testing I tried to open a JPEG file as a project file with ProjectOpen(), guess what, Vegas opened the file and added it to the timeline of the existing project!

Randall

Comments

rcampbel wrote on 6/28/2004, 11:12 AM
I found a way around this by checking that the Project.FilePath was updated after the OpenProject. I don't expect this to be fixed in Vegas 4.0.

One interesting footnote on Vegas 5.0. The dialog that the file is invalid does not popup until the script is exited. On Vegas 4.0, it popped to the front as soon as it happened.

Thanks,

Randall
SonyPJM wrote on 6/30/2004, 5:03 AM
Thanks for the bug report... we'll try to fix it for the next release.