Snippets and Favorites

GoDraw3 comes with the ability to include Snippets and Favorites into your implementation. These are useful for providing pre-defined elements to the application. 


  • Snippets are objects created within the GoDraw application. 
  • Any element drawn in the canvas can be saved as a Snippet.
  • A Snippet is just a JSON object.
  • Snippets can include tagged data.

Creating a Snippet

A snippet is created from selecting any one or more objects and pressing the "Snippet" button, that runs the "Copy Selected Node (GoDraw3)" script. The text is saved to the clipboard. Here's an example of a snippet. (notice since it's JSON I can do any editing to it that I like in a text editor or elsewhere).

[{"type":"CreateAction","node":"PathNode","properties":{"fillStyle":"#ff0000","strokeStyle":"#000000","lineWidth":2,"shadow":false,"matrix":["Matrix",0.28,0,0,0.28,264,117],"layer":"default","textFillStyle":"#000000","fontName":"Arial","fontSize":24,"dashes":"","shapeWidth":0,"smoothness":0.3,"sloppiness":0,"closed":true,"arrowSize":0,"arrowXOffset":null,"arrowStyle":"simple","doubleArrow":false,"text":"","roundRadius":0,"wrap":false,"angleArcs":0,"commands":[0,0,-50,6,50,0,50,-50,6,0,50,50,50,6,-50,0,-50,50,6,0,-50,-50,-50,7],"seed":21125,"tag":{"description":"Patient is reporting a dull pain","type":"Left Shoulder","value":2}}}]

Saving a Snippet

The GoDraw3 file contains a table called "Snippets". Once a snippet is copied to the clipboard, the text can be saved in this table. A default icon fills the image, but you can easily update this icon by replicating the snippet in graphical form in GoDraw3 or another drawing program and saving it as a picture file.

Using Snippets

Once the snippet is saved in the "Snippets" table, it can be accessed through the Snippets Popover found on the drawing canvas. A user simply clicks on the icon and the snippet is added to the drawing.


Favorites are saved pictures (.jpg, .png) that can be added to any drawing. These are found in the "Favorites" table of the GoDraw3 file. They do not have the same flexibility as Snippets since these are not JSON objects, but they can be use used for simple elements.

Adding Favorites

Favorites can be added/removed by going into the GoDraw3 file and updating the Favorites table. Simply add your picture file to a new record, give it a name, and you're all set. You may need to adjust the portal found in the Favorites popover on the "Example Editor" layout, giving it scrollbar capabilities.

Still need help? Contact Us Contact Us