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
Tables1
Relationships0
Layouts1
Scripts1
Value Lists0
Custom Functions0
Custom Menus33
File Options
Default custom menu set[Standard FileMaker Menus]
When opening file
Minimum allowed version12.0
Login usingAccount Name; Account= Admin
Allow user to save passwordOff
Require iOS passcodeOff
Switch to layoutOff
Hide all toolbarsOff
Script triggers
OnFirstWindowOpenOff
OnLastWindowCloseOff
OnWindowOpenOff
OnWindowCloseOff
OnFileAVPlayerChangeOff
Thumbnail Settings
Generate ThumbnailsOn; Temporary

 

Tables

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

Fields

Table Name: Export Images - 2 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
ImageNormal, BinaryAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
      FileNameNormal, TextAuto-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 PropertiesCoordinatesField FormatField BehaviorQuick 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 PropertiesCoordinatesField FormatField BehaviorQuick 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 PropertiesCoordinatesScript/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 Namerun
            Run script with full access privilegesOff
            Include In MenuYes
            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: