GoDraw Basic Integration
GODRAW V2 BASIC INTEGRATION
GoDraw can by used sort of like a plugin. You just call scripts in the GoDraw file from your own file, and that's it. If you purchased a “Site License”, this the only way you can integrate with GoDraw.
You only have to create two scripts in your file to integrate GoDraw. The first script calls the GoDraw API. This prepares and opens the GoDraw Document (aka your drawing) in the editor. That leaves the editor open for use.
The second is called By GoDraw when the user is done editing. This second script is called a “CallBack” because GoDraw calls back to your file with the parameter that you can use to find out what happened in the editing session. Did the user save or cancel, for example? You write this CallBack script to handle that response appropriately.
There are examples of both these scripts in the GoDraw Example.fmp12 file. In fact, there are two example of each one. You will find that file in the download package you received when you purchased GoDraw.
The first example is in the folder called “Draw On Photos”. Check out these two scripts.
- Draw On An Image
- Handle Result Of Drawing on an Image
The first one opens the editor with your Drawing, and the second one is the callback. You can copy and paste these two scripts into your solution as templates for how to do your integration. Make sure you READ all of the comments in the script. They should walk you through each step you need to take.
The second example is in the folder “Empty Drawing”. It is a slight variation on the first. It demonstrates how to create a GoDraw Document without having an image, by just supplying, Height and Width.