saveblueprint
saveblueprint
DATABASE
,
PATH

The saveblueprint statement save a blueprint of a database’s structure.

Parameters

This statement has two parameters:

database – database to save.

path – path where the blueprint should be saved. If this is blank, or omitted, the blueprint will be saved in the same folder as the database, using the database name with .panblueprints appended.

Description

Panorama’s blueprint feature allows the structure of a database (its fields, forms, procedures and preferences) to be exported in a pure text format. Every detail of the database design is included in the blueprint. The text of a blueprint is actually a Panorama program that when run, will create an exact clone of the original database (without any data). Blueprints have several uses:

- Blueprints make Panorama more compatible with source version control (SVN) systems like Git and Mercurial.
- Blueprints allow you to examine and (carefully) modify the internal structure of a database.
- Blueprints can be used as a template for writing custom procedures for creating Panorama databases (or parts of a database) on the fly.
- Blueprints allow the data and structure of the database to be manipulated separately.

It’s easy to create a blueprint of the current database. This example will create a blueprint in the same folder as the database, with the same name as the current database but with an extension of .panblueprint. For example, if the database is named Mailing List, the blueprint file will be Mailing List.panblueprint.

    saveblueprint ""

If you want to create a blueprint for some other open database, simply supply the database name.

    saveblueprint "Checkbook"

Blueprints are normally saved in the same folder as the database, with the same name, but you can specify a different folder and/or name. This example makes a blueprint of the Contacts database. The blueprint will be named Mailing List.panblueprint and will be saved into the Dropbox folder.

    saveblueprint "Contacts","~/Dropbox/Mailing List"

If you later want to convert a blueprint back into a new, cloned database, use the newdatabaseusingblueprint statement.

    newdatabaseusingblueprint "~/Dropbox/Mailing List"

You can also clone a single form from a blueprint using the newformusingblueprint statement.

Note: Panorama’s blueprint files are not monolithic text files, but rather a package that contains multiple text files. The Finder allows you to see the contents of the blueprint file by right clicking and choosing Show Package Contents from the pop-up menu. The package contains a master text file (Database Blueprint) that contains the specifications for all database fields, permanent variables, and preferences, and also determines the order of forms and procedures within the database. The package contains a Forms folder that contains a separate text blueprint for each form in the database. There is also a Procedures folder that contains individual files with the source code for each procedure.

All of the files in the package have an extension of “.estes” and can be opened with any text editor.

See Also

- blueprintlibraries -- generates blueprints for all procedure library databases.
- constructfieldssheet -- opens a sheet to add/insert multiple new fields into the database.
- Database Blueprints -- exporting a database into a blueprint.
- fieldblueprint -- creates blueprint code for the specified field.
- fieldblueprintsheet -- opens a sheet to edit the blueprint of the current field.
- formblueprint -- creates blueprint code for the specified form.
- formblueprintsheet -- opens a sheet to edit the blueprint of the current form.
- formobjectblueprint -- creates blueprint code for specified form object.
- formoptionsblueprintsheet -- opens a dialog sheet to edit the blueprint of the current form options.
- newdatabaseusingblueprint -- creates a new database from a blueprint.
- newformusingblueprint -- creates a new form from a blueprint.
- selectedformobjectsblueprintsheet -- opens a sheet to edit the blueprint of the currently selected objects.

History

Version | Status | Notes
10.0 | New | New in this version.