Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

MBS FileMaker Plugin Example Databases

Export Images

All examples are included with download of MBS FileMaker Plugin.

Export Images.fmp12

Overview
Tables 1
Relationships 0
Layouts 1
Scripts 1
Value Lists 0
Custom Functions 0
Custom Menus 33
File Options
Default custom menu set [Standard FileMaker Menus]
Default theme Enlightened
When opening file
Minimum allowed version 12.0
Login using Account Name; Account= Admin
Allow user to save password On
Require iOS passcode Off
Show Sign-in fields Off
Switch to layout Off
Hide all toolbars Off
Script triggers
OnFirstWindowOpen Off
OnLastWindowClose Off
OnWindowOpen Off
OnWindowClose Off
OnFileAVPlayerChange Off
OnWindowTransaction Off
Thumbnail Settings
Generate Thumbnails On; Temporary

 

Tables

Table Name
Statistics
Comments
Occurrences in Relationship Graph
Export Images
2 fields defined, 1 record
Export Images

Fields

Table Name: Export Images - 2 Fields
Field Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
Image Normal, Binary Auto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
      FileName Normal, Text Auto-Enter: Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German

            Layout Objects: Export Images

            Regular Fields

            Field Name: Export Images::Image
            Field Properties Coordinates Field Format Field Behavior Quick Find
            • Top: 76 pt
            • Left: 138 pt
            • Bottom: 256 pt
            • Right: 391 pt
            • Anchoring: Left, Top
            Field Format:
            • Edit Box
            Field Behavior:
            • Allow field to be entered: In Find mode, In Browse mode
            • Touch keyboard type: System Default
            • Go to next field using: Tab key
            No

            Field Name: Export Images::FileName
            Field Properties Coordinates Field Format Field Behavior Quick Find
            • Top: 262 pt
            • Left: 138 pt
            • Bottom: 283 pt
            • Right: 391 pt
            • Anchoring: Left, Top
            Field Format:
            • Edit Box
            Field Behavior:
            • Allow field to be entered: In Find mode, In Browse mode
            • Touch keyboard type: System Default
            • Go to next field using: Tab key
            Yes

            Buttons

            Button Properties Coordinates Script/Script Step
              Type:
            • Text: Export to desktop
            • Top: 145 pt
            • Left: 402 pt
            • Bottom: 187 pt
            • Right: 511 pt
            • Anchoring: Left, Top
            Perform Script [ “run” ]

            Scripts:


            Script Hierarchy

            run

            Script Name run
            Run script with full access privileges Off
            Siri Shortcut Visible Off
            Include In Menu Yes
            Layouts that use this script
            Scripts that use this script
              Script Definition
              Script Steps
              • #The script export the picture as JPEG, PNG, TIFF, PSD, BMP, PDF, PICT and TGA to the desktop
              • #prepare
              • #Loade picture
              • Set Variable [ $img; Value:MBS("GMImage.NewFromContainer"; Export Images::Image) ]
              • #Finde destination path
              • Set Variable [ $fpath; Value:Get ( DesktopPath ) ]
              • Set Variable [ $rpath; Value:MBS( "Path.FilemakerPathToNativePath"; $fpath ) ]
              • Set Variable [ $rpath; Value:$rpath & "/test" ]
              • #save as JPEG
              • Set Variable [ $path; Value:$rpath & ".jpg" ]
              • Set Variable [ $r; Value:MBS( "GMImage.SetMagick"; $img; "JPEG" ) ]
              • Set Variable [ $r; Value:MBS("GMImage.WriteToFile"; $img; $path) ]
              • If [ $r ≠ "OK" ]
              • Show Custom Dialog [ Title: "Error with JPEG"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
              • End If
              • #save as PNG
              • Set Variable [ $path; Value:$rpath & ".png" ]
              • Set Variable [ $r; Value:MBS( "GMImage.SetMagick"; $img; "PNG" ) ]
              • Set Variable [ $r; Value:MBS("GMImage.WriteToFile"; $img; $path) ]
              • If [ $r ≠ "OK" ]
              • Show Custom Dialog [ Title: "Error with PNG"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
              • End If
              • #save as TIFF
              • Set Variable [ $path; Value:$rpath & ".tif" ]
              • Set Variable [ $r; Value:MBS( "GMImage.SetMagick"; $img; "TIF" ) ]
              • Set Variable [ $r; Value:MBS("GMImage.WriteToFile"; $img; $path) ]
              • If [ $r ≠ "OK" ]
              • Show Custom Dialog [ Title: "Error with TIFF"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
              • End If
              • #save as BMP
              • Set Variable [ $path; Value:$rpath & ".bmp" ]
              • Set Variable [ $r; Value:MBS( "GMImage.SetMagick"; $img; "BMP" ) ]
              • Set Variable [ $r; Value:MBS("GMImage.WriteToFile"; $img; $path) ]
              • If [ $r ≠ "OK" ]
              • Show Custom Dialog [ Title: "Error with BMP"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
              • End If
              • #save as PDF
              • Set Variable [ $path; Value:$rpath & ".pdf" ]
              • Set Variable [ $r; Value:MBS( "GMImage.SetMagick"; $img; "PDF" ) ]
              • Set Variable [ $r; Value:MBS("GMImage.WriteToFile"; $img; $path) ]
              • If [ $r ≠ "OK" ]
              • Show Custom Dialog [ Title: "Error with PDF"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
              • End If
              • #save as TGA
              • Set Variable [ $path; Value:$rpath & ".tga" ]
              • Set Variable [ $r; Value:MBS( "GMImage.SetMagick"; $img; "TGA" ) ]
              • Set Variable [ $r; Value:MBS("GMImage.WriteToFile"; $img; $path) ]
              • If [ $r ≠ "OK" ]
              • Show Custom Dialog [ Title: "Error with TGA"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
              • End If
              • #Release image
              • Set Variable [ $r; Value:MBS("GMImage.Free"; $img) ]
              Fields used in this script
              Scripts used in this script
                Layouts used in this script
                  Tables used in this script
                  Table occurrences used by this script
                  Custom Functions used by this script
                    Custom menu set used by this script

                      Download example: Export Images

                      Used functions: