This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v20 R8
Exporting structure to text files

Exporting structure to text files  


 

You can export your database structure elements to a set of separate files. Text-based elements, such as methods, menus, forms, settings, etc., are exported as single files in text format. Pictures are exported in their native formats. Elements of the same type are automatically grouped in specific folders.

The database structure is exported in its current state. This feature allows you to store database structure files in a source control repository (i.e., Git, Perforce, etc.) and export the database structure on a daily basis, for example. Successive changes or changes from several developers on the same file can then be compared using standard source control tools. 

Exporting the structure file is available in the following contexts only:

  • 4D in local mode or 4D Server,
  • 64-bit versions,
  • Database in interpreted mode.

To export database structure elements to text files, you can either:

  • select the Export > Structure to text files... menu item in the File menu (4D Developer):


     
    A standard folder selection dialog box is displayed, allowing you to select the folder where files will be exported. Once the dialog box is validated, the export is automatically executed.
    With this menu command, the export is executed with standard options (see below). If you want to select specific elements to export, you need to use the command.
    Note: The menu item is disabled if the design environment is not available (e.g., the database is compiled or the user does not have design access rights).
  • or execute the command (on 4D Developer or on 4D Server). This command provides parameters allowing you to filter elements to export. For more information, please refer to the command description.

Note: To preserve consistency between versions, 4D always exports files using English settings for language code, date and time formats, as well as number formats (decimal and grouping characters).

In the export destination folder, 4D will create or use several subfolders when necessary. The following table describes each exported element:

 

Main folderSubfolder (if any)File name or path(*)DescriptionExported by the File menu
Sources
catalog.4DCatalogTable and field definitions (XML)yes
folders.jsonExplorer folder definitionsyes
menus.jsonMenu definitionsyes
settings.4DSettingsDatabase settings (XML)yes
tips.jsonDefined tipsyes
lists.jsonDefined listsyes
filters.jsonDefined filtersyes
DatabaseMethods<databaseMethodName>.4dmDatabase methods defined in the database. One file per database methodyes
Methods<methodName>.4dmProject methods defined in the database. One file per methodyes
Forms<formName>/form.4DFormProject form description in JSON formatyes
<formName>/method.4dmProject form methodyes
<formName>/Images/<pictureName>Project form static picturesyes
<formName>/ObjectMethods/<objectName>.4dm.4dm file for each object methodyes
TableForms<n>/Input/<formName>/form.4DFormInput table form description in JSON format (n is the table number)yes
<n>/Input/<formName>/Images/<pictureName>Input table form static picturesyes
<n>/Input/<formName>/method.4dmInput table form methodyes
<n>/Input/<formName>/ObjectMethods/<objectName>.4dm.4dm file for each object methodyes
<n>/Output/<formName>/form.4DFormOutput table form description in JSON format (n is the table number)yes
<n>/Output/<formName>/Images/<pictureName>Output table form static picturesyes
<n>/Output/<formName>/method.4dmOutput table form methodyes
<n>/Output/<formName>/ObjectMethods/<objectName>.4dm.4dm file for each object methodyes
Triggerstable_<n>.4dmTrigger methods defined in the database. One trigger file per tableyes
SettingsBuildApp.4DSettingsBuildApp.xml fileyes
Backup.4DSettingsBackup.xml fileyes
directory.json4D groups and usersyes
ResourcesCopy of the Resources folderno
Images<item>Pictures from the picture library as separate files. Names of picture library items become file names. If a duplicate exists, a number is added to the name.no
TrashMethods(<methodName>.4dm)Trashed methodsno
Forms(<formName>.4DForm)Trashed formsno
userPreferences.<userName>methodPreferences.jsonMethod editor preferencesno
methodWindowPositions.jsonCurrent user window positionsno
preferences v15.4DPreferencesData file pathno
LogsConversion log files. Conversion file names are timestamped. Conversion log files contain the same information as the Result object from the command.yes

(*) 4D automatically encodes characters which are forbidden at the system level for pathnames, so that no error is generated. For example, "Button/1" is encoded "Button%2F1". For a list of encoded characters, please refer to the section.

Notes:

  • The .4dm file extension is a text-based file format, containing the code of a 4D method. It is compliant with source control tools. 
  • Automatic height resizing for objects associated to style sheets is disabled.
  • Form objects or properties that are not supported in Dynamic Forms generate errors in the conversion log file. Refer to the  paragraph.

 
PROPERTIES 

Product: 4D
Theme: Managing 4D databases

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v17 R3

 
ARTICLE USAGE

4D Design Reference ( 4D v20 R8)