Balsamiq for Desktop documentation
- Introduction to Balsamiq Wireframes for Desktop
- Editor overview
- Adding and arranging UI controls
- Editing controls
- Sharing and reviewing
- Using images, assets, and icons
- Symbols
- Markup
- Linking wireframes together
- Full Screen Presentation Mode
- Alternates
- Exporting
- Importing
- Keeping projects clean and organized
- Keyboard shortcuts
- The BMPR file format
- Overview
- Details
- The INFO table
- The RESOURCES table
- The BRANCHES table
- The THUMBNAILS table
- The USERS table
- The COMMENTS table
- Summary
- Autosaving
- Backups and the Support folder
- Windows advanced installation instructions
- macOS advanced installation instructions
- Installing Balsamiq Wireframes on Linux
The BMPR file format
People often ask us if Balsamiq can export to HTML/CSS/JS or XAML or Ruby or other programming languages. In short, we don't, and don't plan to. We don't have the resources to do it, and want to keep our focus on our core product.
Instead, we chose to document our file format, so that developers can build their own tool to integrate with our products, if they wish.
Maybe you're curious about how your projects are stored. Maybe you want to make tools that can read the files or even generate BMPR files programmatically. Maybe you want to teach a robot how to draw your wireframes using chalk on sidewalks. We hope that happens!
Overview
At the heart of all Balsamiq projects are BMPR files. BMPR files (short for Balsamiq Mockups PRojects) are a type of BAR file. BAR files, or Balsamiq ARchive files, provide a way a storing different kinds of content while also providing a consistent set of tools for reading and writing that content.
BAR is a format for files that have resources of various types, branches, thumbnails, and comments. For instance, one could build the next Keynote, Visio, or Photoshop using BAR as its file format. Our hope is that some day someone might want to adopt the format. If not, we'll probably adopt it ourselves for our next product.
In other words, BMPR files are a kind of BAR file. All BAR files share similar APIs describing what kind of content the archive contains.
In the case of BMPR files that content contains everything there is to know about a Balsamiq project.
Getting a BMPR file
If you want to test out a BMPR file, create a new wireframe using Balsamiq app and save the file somewhere. That's a BMPR file. Or download the example used for creating some of the documentation that follows.
The BMPR format isn't the first format we've used for Balsamiq. For example, in the past we've used BMML. A Mockups 2 project requires multiple BMML files making them a little more cumbersome to manage. A single BMPR file contains everything for a project. This single file approach makes sharing projects much easier.
Versions
The current version of the BMPR file format is 2.0.
We use Semantic Versioning (SemVer for short) for the BMPR file format. This means, among other things, that the API for version 2.x of the file format won't change. New minor versions can change the API but will remain backwards compatible with previous versions. Major versions such as a 3.0 release will be incompatible with previous major versions.
Balsamiq Mockups 3, released in March 2015, creates BMPR files with 1.2 format. It can open 2.0 files, but new features like Comments are not available.
Balsamiq Wireframes, released in September 2017, creates BMPR file with 2.0 format. It can open 1.2 files, converting them to the new 2.0 format.
When writing tools for the BMPR file format it's a good idea to ensure that your tools are aware of version differences. BMPR files are a type of BAR file, and all BAR files contain both the file format type (such as bmpr) and the version (2.0) that file format uses. Examples of how those details are stored can be found in the INFO section below.
Details
A BMPR file is a humble SQLite database file that stores both scalar values (single numbers, strings, etc) and JSON data that describes every detail of a Balsamiq project. Using SQLite enables BMPR files to take advantage of the huge amount of historical experience, tools, and libraries for reading and writing to relational databases while also being very portable and embeddable.
Here's what a BMPR file looks like when opened using the free DB Browser for SQLite app:
There are 6 tables in a BMPR file:
- INFO contains details about what kind of resources an archive contains
- RESOURCES is where most of the content found in a project lives
- BRANCHES contains information about branches in a project
- THUMBNAILS has entries for wireframe thumbnails
- USERS informations about people who added comments
- COMMENTS contains all the comments
The INFO table
The INFO table describes what kind of data, or resources, our file contains. BMPR files are a kind of BAR file, and BAR files use the INFO table to describe what kind of data they contain. It allows developers to inspect an archive file so they can make informed decisions about how to handle the content within.
Field | Datatype | Description |
---|---|---|
NAME | TEXT | The unique name of the kind of meta data for this row. Think of this as a you would a key in structure or hash. |
VALUE | TEXT | The value for this meta data entry |
NAME | VALUE |
---|---|
SchemaVersion | 2.0 |
ArchiveRevision | 44 |
ArchiveRevisionUUID | 007F035B-6147-D643-C5CC-2871D9DA1C43 |
ArchiveFormat | bmpr |
ArchiveAttributes |
{
"creationDate":1467124505618, // the date this archive file was created
"name":"banking_interface" // the name of the resource
}
|
SchemaVersion
This is the file format version number for the kind of resource this archive contains.
ArchiveRevision
This contains a count of how many times this archive file has been changed.
ArchiveRevisionUUID
This is a unique ID that identifies the latest revision of this archive.
ArchiveFormat
This indicates what kind of data this archive contains (for example, bmpr).
ArchiveAttributes
This is a JSON hash containing the creation date of the file as well as a name for the contents of this archive.
The RESOURCES table
Details about wireframes, assets, and symbols are stored here. Each row in this table contains details (coordinates, shape, and size, etc.) about every element in a project.
Field | Datatype | Description | Example |
---|---|---|---|
ID | TEXT | A unique id for a resource |
ADC6E183-B52E-038A-1BBC-DAEDBAE75554 |
BRANCHID | TEXT | The branch this resource belongs to |
Master |
ATTRIBUTES | TEXT |
JSON data with keys for creationDate, thumbnailID, kind, modifiedBy, notes, mimeType, order, name, importedFrom, parentID, and trashed |
|
Example:
The order key is only present when the resource is a mockup.
|
|||
DATA | TEXT |
JSON data with keys for wireframe data. See below for more details. If the resource is a kind of otherAsset or asset the data stored for this resource will be the Base64 encoded representation of the asset. |
|
Example:
|
Stored resources share some common keys. The first 10 keys in the following example will be the same for any kind of mockup or symbol resource.
{
"typeID": "DataGrid", // the type of element this is (ie. DataGrid, or TabBar)
"ID": "2", // a unique integer for this resource
"h": "319", // the pixel height of this resource
"w": "739", // the pixel width of this resource
"x": "30", // the x position of this resource
"y": "257", // the y position of this resource
"zOrder": "17", // the position of this resource, front to back
"properties": { // resource type specific properties
"hLines": "false",
"selectedIndex": "0",
"size": "14",
"text": "[CSV formatted data for this DataGrid]",
"vLines": "true",
"verticalScrollbar": "true"
}
}
Each different kind of resource will have properties that are specific to that kind of resource. Note how some keys within properties differ between the example above and below:
{
"typeID": "TabBar",
"ID": "7",
"h": "535",
"w": "769",
"x": "15",
"y": "52",
"measuredH": "100",
"measuredW": "241",
"zOrder": "2",
"properties": {
"borderStyle": "square",
"color": "15658734",
"selectedIndex": "0",
"tabHPosition": "center",
"text": "[Comma separated list of tab names]"
}
}
Each Symbol Library that's been added to a project has its own RESOURCE record with JSON data describing all of the controls that that library makes available. Each instance of a control used in a wireframe is described in the JSON within the DATA column for a wireframe's RESOURCE record.
Documenting each different kind of resources, each with their own set of properties, is well beyond the scope of this reference. Knowing the purpose of their common keys should at least provide a foundation for understanding each different kind.
The BRANCHES table
The branches table contains records for each branch in a project. A typical project will contain a "Master" branch at the very least.
Field | Datatype | Description |
---|---|---|
ID | TEXT | A unique id for a branch |
ATTRIBUTES | TEXT | JSON data. Keys depend on whether the record is for a Master branch or alternate branch. |
Master branch example:
An alternate branch example:
|
Things to know about branches and alternates:
Balsamiq doesn't use terms like "branchName" - it uses alternate versions. You can read more about alternate versions here.
Changes made to things like fonts, link colors, project descriptions on an alternative branch are actually made to the Master branch. Alternative branches inherit these properties from the Master branch, which is why alternative branches only contain a branchName.
Here what the data looks like when the font is changed for an alternate:
That font setting is applied to the master branch, as seen here:
The THUMBNAILS table
Every Balsamiq project has thumbnails of the wireframes within the project. The THUMBNAILS table keeps track of those thumbnails.
Field | Datatype | Description | Example |
---|---|---|---|
ID | TEXT |
A unique id for a thumbnail. |
4B16F0EB-CAD0-5E34-0BD3-DAEDBAF4CAF6 |
ATTRIBUTES | TEXT |
JSON data with keys for image, resourceID, and branchID |
|
Example:
|
The USERS table
Added in version 2.0, the USERS table includes information of anyone who interacted with the Comments feature.
Field | Datatype | Description | Example |
---|---|---|---|
ID | TEXT |
A unique id for a user, based on the platform Wireframes runs on. |
cloudUserId-8416193 or foo@bar.com or 557058:67322ce6-5f70-40d9-8993-89cc1821cc7c |
ATTRIBUTES | TEXT |
JSON data with keys for userName, displayName, email, anonymous, and inProject |
|
Example:
|
The COMMENTS table
Added in version 2.0, the COMMENTS table tracks comments information, such as its text and callouts, threading information, likes and reads.
Field | Datatype | Description | Example |
---|---|---|---|
ID | TEXT |
A unique id for a comment. |
5B44B9ED-4357-48DB-B1DD-BF5CA6D22B40 |
RESURCEID | TEXT |
The resource that the comments is attached to. |
ADC6E183-B52E-038A-1BBC-DAEDBAE75554 |
BRANCHID | TEXT |
The branch of the resource that the comments is attached to. |
Master |
USERID | TEXT |
The id of the user id who added the comment. |
cloudUserId-8416193 |
ATTRIBUTES | TEXT |
JSON data with creation timestamp, trashed value and trashedBy user, readBy and likedBy arrays of user ids, an additional timestamps object for modification timestamp, and a comment's parentID when it is threaded under another comment. |
{
"parentID":"",
"readBy":["cloudUserId-8416266"],
"timestamp":1584962702861,
"trashed":false,
"trashedBy":"",
"likedBy":["cloudUserId-8416266"],
"timestamps":{"text":1584962727757}
} |
DATA | TEXT |
JSON data with the text of the comment and, if present, an array of callout objects. Each callout has a unique id, a |
{
"text":"[(1)](04D95E14-186F-4FA8-AE92-2D7CA0250355) Comment text, with a callout",
"callouts":[{
"x":96,"y":229,
"tip":"bottom",
"id":"04D95E14-186F-4FA8-AE92-2D7CA0250355",
"label":"1",
"color":13576743,
"labelColor":16448250}]
} |
Summary
We hope this reference is useful. If you can think of ways that would help us make it more useful for you we want to hear about it and make it better. If you build a tool that supports BMPR let us know so we can tell people about it!
- Keyboard shortcuts
- Autosaving