MBS FileMaker Plugin Example Databases

Drawing

All examples are included with download of MBS FileMaker Plugin.

Drawing.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts7
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
Drawing
1 field defined, 1 record
Drawing

Fields

Table Name: Drawing - 1 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
ImageNormal, BinaryAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1

      Layout Objects: Drawing

      Regular Fields

      Field Name: Drawing::Image
      Field PropertiesCoordinatesField FormatField BehaviorQuick 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 PropertiesCoordinates
        Orientation:
      • vertical
      • Top: 74 pt
      • Left: 479 pt
      • Bottom: 324 pt
      • Right: 643 pt
      • Anchoring: Left, Top
      Button Segments
      Button PropertiesCoordinatesScript/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 PropertiesCoordinatesScript/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 PropertiesCoordinatesScript/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 PropertiesCoordinatesScript/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 PropertiesCoordinatesScript/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 PropertiesCoordinatesScript/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 NameDrawLine
      Run script with full access privilegesOff
      Include In MenuYes
      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 NameDrawCircle
                Run script with full access privilegesOff
                Include In MenuYes
                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 NameDrawEllipse
                          Run script with full access privilegesOff
                          Include In MenuYes
                          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 NameDrawArc
                                    Run script with full access privilegesOff
                                    Include In MenuYes
                                    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 NameDrawRectangle
                                              Run script with full access privilegesOff
                                              Include In MenuYes
                                              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 NameDrawRoundRectangle
                                                        Run script with full access privilegesOff
                                                        Include In MenuYes
                                                        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 NameTrace
                                                                  Run script with full access privilegesOff
                                                                  Include In MenuYes
                                                                  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:




                                                                                    Links
                                                                                    MBS FileMaker blog