Procedurally Saving a new db

What is the trick to create a new db and save it as a db?
The below doesn’t seem to be the correct verbiage.

NewDatabase
SaveAs "Junk February 28, 2021"

You have to include the path e.g.

saveas info("desktopfolder")+"Junk February 28, 2021"

Ok. I read too much into this statement in the Help file.

“If you want to save the new file in the same folder as the existing file, this parameter can simply be the new file name.”

Given that there is no ‘existing file’, I presumed there was a default directory, but alas, no. The SaveAs statement is just ignored which is not typical for an error condition. Thanks.

There is a default directory, the SaveAs is not ignored, the default directory is the folder that contains PanoramaX.app. You can easily determine this by command-clicking on the proxy icon of your new database. In my case today, the PanoramaX.app file is in the location where Xcode put it, for you that probably is the /Applications folder.

I tried this, but that isn’t what is happening. The procedure reads.

NewDatabase
SaveAs "Test DB"

The new database is still named Untitled, there is no proxy icon, and the Applications folder doesn’t have anything but applications and folders in it.

The same here (macOS Big Sur 11.2.2).

It was in my long ago past that I did vaguely remember that a Save (or SaveAs) to a new file would default the Application directory but when it did not work, I figured it was all on me.

Apparently it works differently depending on whether Panorama is running under the Xcode debugger. I took your code and pasted it into a procedure and ran it, that’s how I got the screen shot. I just tried it again with a copy of PanoramaX.app running standalone (not under the debugger) and I got the same results as @RAmeeti and @KJM.

In any case, if there is no saved database open you must specify the entire folder path.