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

MBS FileMaker Plugin Example Databases

Drawing

All examples are included with download of MBS FileMaker Plugin.

Drawing.fmp12

Overview
Tables 1
Relationships 0
Layouts 1
Scripts 7
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
Drawing
1 field defined, 1 record
Drawing

Fields

Table Name: Drawing - 1 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

      Layout Objects: Drawing

      Regular Fields

      Field Name: Drawing::Image
      Field Properties Coordinates Field Format Field Behavior Quick Find
      • Top: 74 pt
      • Left: 47 pt
      • Bottom: 324 pt
      • Right: 436 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

      Button Bars

      Button Bar Properties Coordinates
        Orientation:
      • vertical
      • Top: 74 pt
      • Left: 479 pt
      • Bottom: 324 pt
      • Right: 643 pt
      • Anchoring: Left, Top
      Button Segments
      Button Properties Coordinates Script/Script Step
        Type:
      • Text:
        Label Calculations:
      • "Draw Line"
      • Top: 74 pt
      • Left: 479 pt
      • Bottom: 116 pt
      • Right: 643 pt
      Perform Script [ “DrawLine” ]

      Scripts:

      Button Properties Coordinates Script/Script Step
        Type:
      • Text:
        Label Calculations:
      • "Draw Circle"
      • Top: 116 pt
      • Left: 479 pt
      • Bottom: 158 pt
      • Right: 643 pt
      Perform Script [ “DrawCircle” ]

      Scripts:

      Button Properties Coordinates Script/Script Step
        Type:
      • Text:
        Label Calculations:
      • "Draw Ellipse"
      • Top: 158 pt
      • Left: 479 pt
      • Bottom: 199 pt
      • Right: 643 pt
      Perform Script [ “DrawEllipse” ]

      Scripts:

      Button Properties Coordinates Script/Script Step
        Type:
      • Text:
        Label Calculations:
      • "Draw Arc"
      • Top: 199 pt
      • Left: 479 pt
      • Bottom: 241 pt
      • Right: 643 pt
      Perform Script [ “DrawArc” ]

      Scripts:

      Button Properties Coordinates Script/Script Step
        Type:
      • Text:
        Label Calculations:
      • "Draw Rectangle"
      • Top: 241 pt
      • Left: 479 pt
      • Bottom: 283 pt
      • Right: 643 pt
      Perform Script [ “DrawRectangle” ]

      Scripts:

      Button Properties Coordinates Script/Script Step
        Type:
      • Text:
        Label Calculations:
      • "Draw Round Rectangle"
      • Top: 283 pt
      • Left: 479 pt
      • Bottom: 324 pt
      • Right: 643 pt
      Perform Script [ “DrawRoundRectangle” ]

      Scripts:


      Script Hierarchy

      DrawLine
      DrawCircle
      DrawEllipse
      DrawArc
      DrawRectangle
      DrawRoundRectangle
      Trace

      Next Script: [DrawCircle]
      Script Name DrawLine
      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
        • #Creates an image, sets settings for the line, paints it with a special size in the environment and writes the image into the container
        • #create environment
        • Set Variable [ $img; Value:MBS("GMImage.New"; "300x200"; "RGB 1 1 1") ]
        • #Define the settings for the line
        • Set Variable [ $r; Value:MBS("GMImage.SetStrokeColor"; $img; "RGB 1 0 0") ]
        • Set Variable [ $r; Value:MBS("GMImage.SetFillColor"; $img; "RGB 0 0 1") ]
        • Set Variable [ $r; Value:MBS("GMImage.SetLineWidth"; $img; 5) ]
        • #draw in enviroment
        • Set Variable [ $r; Value:MBS("GMImage.DrawLine"; $img; 50; 50; 250; 150) ]
        • #write image to container
        • Set Variable [ $png; Value:MBS("GMImage.WriteToPNGContainer"; $img; "test.png") ]
        • #Release enviroment
        • Set Variable [ $r; Value:MBS("GMImage.Free"; $img) ]
        • Set Field [ Drawing::Image; $png ]
        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

                Previous Script: [DrawLine] Next Script: [DrawEllipse]
                Script Name DrawCircle
                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
                  • #Creates an image, sets settings for the circle, paints it with a special size in the environment and writes the image into the container
                  • #create environment
                  • Set Variable [ $img; Value:MBS("GMImage.New"; "300x200"; "RGB 1 1 1") ]
                  • #Define the settings for the circle
                  • Set Variable [ $r; Value:MBS("GMImage.SetStrokeColor"; $img; "RGB 1 0 0") ]
                  • Set Variable [ $r; Value:MBS("GMImage.SetFillColor"; $img; "RGB 0 0 1") ]
                  • Set Variable [ $r; Value:MBS("GMImage.SetLineWidth"; $img; 5) ]
                  • #draw in enviroment
                  • Set Variable [ $r; Value:MBS("GMImage.DrawCircle"; $img; 150; 100; 100; 100) ]
                  • #write image to container
                  • Set Variable [ $png; Value:MBS("GMImage.WriteToPNGContainer"; $img; "test.png") ]
                  • #Release enviroment
                  • Set Variable [ $r; Value:MBS("GMImage.Free"; $img) ]
                  • Set Field [ Drawing::Image; $png ]
                  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

                          Previous Script: [DrawCircle] Next Script: [DrawArc]
                          Script Name DrawEllipse
                          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
                            • #Creates an image, sets settings for the ellipse, paints it with a special size in the environment and writes the image into the container
                            • #create environment
                            • Set Variable [ $img; Value:MBS("GMImage.New"; "300x200"; "RGB 1 1 1") ]
                            • #Define the settings for the ellipse
                            • Set Variable [ $r; Value:MBS("GMImage.SetStrokeColor"; $img; "RGB 1 0 0") ]
                            • Set Variable [ $r; Value:MBS("GMImage.SetFillColor"; $img; "RGB 0 0 1") ]
                            • Set Variable [ $r; Value:MBS("GMImage.SetLineWidth"; $img; 5) ]
                            • #draw in enviroment
                            • Set Variable [ $r; Value:MBS("GMImage.DrawEllipse"; $img; 150; 100; 80; 60; 0; 360) ]
                            • #write image to container
                            • Set Variable [ $png; Value:MBS("GMImage.WriteToPNGContainer"; $img; "test.png") ]
                            • #Release enviroment
                            • Set Variable [ $r; Value:MBS("GMImage.Free"; $img) ]
                            • Set Field [ Drawing::Image; $png ]
                            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

                                    Previous Script: [DrawEllipse] Next Script: [DrawRectangle]
                                    Script Name DrawArc
                                    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
                                      • #Creates an image, sets settings for the arc, paints it with a special size in the environment and writes the image into the container
                                      • #create environment
                                      • Set Variable [ $img; Value:MBS("GMImage.New"; "300x200"; "RGB 1 1 1") ]
                                      • #Define the settings for the arc
                                      • Set Variable [ $r; Value:MBS("GMImage.SetStrokeColor"; $img; "RGB 1 0 0") ]
                                      • Set Variable [ $r; Value:MBS("GMImage.SetFillColor"; $img; "RGB 0 0 1") ]
                                      • Set Variable [ $r; Value:MBS("GMImage.SetLineWidth"; $img; 5) ]
                                      • #draw in enviroment
                                      • Set Variable [ $r; Value:MBS("GMImage.DrawArc"; $img; 50; 50; 250; 150; 0; 90) ]
                                      • #write image to container
                                      • Set Variable [ $png; Value:MBS("GMImage.WriteToPNGContainer"; $img; "test.png") ]
                                      • #Release enviroment
                                      • Set Variable [ $r; Value:MBS("GMImage.Free"; $img) ]
                                      • Set Field [ Drawing::Image; $png ]
                                      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

                                              Previous Script: [DrawArc] Next Script: [DrawRoundRectangle]
                                              Script Name DrawRectangle
                                              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
                                                • #Creates an image, sets settings for the rectangle, paints it with a special size in the environment and writes the image into the container
                                                • #create environment
                                                • Set Variable [ $img; Value:MBS("GMImage.New"; "300x200"; "RGB 1 1 1") ]
                                                • #Define the settings for the rectangle
                                                • Set Variable [ $r; Value:MBS("GMImage.SetStrokeColor"; $img; "RGB 1 0 0") ]
                                                • Set Variable [ $r; Value:MBS("GMImage.SetFillColor"; $img; "RGB 0 0 1") ]
                                                • Set Variable [ $r; Value:MBS("GMImage.SetLineWidth"; $img; 5) ]
                                                • #draw in enviroment
                                                • Set Variable [ $r; Value:MBS("GMImage.DrawRectangle"; $img; 50; 50; 250; 150) ]
                                                • #write image to container
                                                • Set Variable [ $png; Value:MBS("GMImage.WriteToPNGContainer"; $img; "test.png") ]
                                                • #Release enviroment
                                                • Set Variable [ $r; Value:MBS("GMImage.Free"; $img) ]
                                                • Set Field [ Drawing::Image; $png ]
                                                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

                                                        Previous Script: [DrawRectangle] Next Script: [Trace]
                                                        Script Name DrawRoundRectangle
                                                        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
                                                          • #Creates an image, sets settings for the round rectangle, paints it with a special size in the environment and writes the image into the container
                                                          • #create environment
                                                          • Set Variable [ $img; Value:MBS("GMImage.New"; "300x200"; "RGB 1 1 1") ]
                                                          • #Define the settings for the RoundRectangle
                                                          • Set Variable [ $r; Value:MBS("GMImage.SetStrokeColor"; $img; "RGB 1 0 0") ]
                                                          • Set Variable [ $r; Value:MBS("GMImage.SetFillColor"; $img; "RGB 0 0 1") ]
                                                          • Set Variable [ $r; Value:MBS("GMImage.SetLineWidth"; $img; 5) ]
                                                          • #draw in enviroment
                                                          • Set Variable [ $r; Value:MBS("GMImage.DrawRoundRectangle"; $img; 50; 50; 250; 150; 10; 10) ]
                                                          • #write image to container
                                                          • Set Variable [ $png; Value:MBS("GMImage.WriteToPNGContainer"; $img; "test.png") ]
                                                          • #Release enviroment
                                                          • Set Variable [ $r; Value:MBS("GMImage.Free"; $img) ]
                                                          • Set Field [ Drawing::Image; $png ]
                                                          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

                                                                  Previous Script: [DrawRoundRectangle]
                                                                  Script Name Trace
                                                                  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
                                                                      • #Starts logging all plugin calls to a text file
                                                                      • Set Variable [ $r; Value:MBS("Trace") ]
                                                                      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: Drawing

                                                                                    Used functions: