Add-ons
Build an add-on
An add-on is a feature people can switch on or off in an app: a folder with a manifest, a JavaScript module, its own language files and help. It extends an app and is never an app of its own.
Start from the developer kit
The developer kit (the guide, a small working add-on to copy, and a test harness that needs nothing installed but Node.js) will be public on GitHub, under the Apache-2.0 license. It is not published yet.
- Copy the template and give it your own id, name and author in
addon.json. - Write your feature against the add-on API. Every word a person reads goes in your own language file.
- Run
npm test: it checks the package the way this directory does, runs your tests against a stand-in for the app and checks that switching your add-on off removes everything it added. - Try it in the real app in developer mode, then run
npm run packand upload the zip.
What an add-on can do
Every app has the shared add-on API: a toolbar group, a section in a side panel, settings of its own, and file types to open and save. MarkupCraft adds markup types of your own (drawn with its own tools, saved in the PDF), a tab in the right panel and columns in the markups list; TakeoffCraft adds item types with their assembly and conditions, columns in the estimate and a section in the right panel. CadCraft has its own, larger API on top:
- commands that work exactly like CadCraft's own, each one a single undo step;
- toolbar groups and More menu items in CadCraft's look, and sections in the Properties panel;
- objects of its own, with grips, that open as ordinary blocks in any CAD program and keep their data through DWG and DXF, even when someone edits the drawing without the add-on;
- its own data on any object, and edits that follow every change in the same undo step (a wire following a moved symbol).
| App | Add-on API |
|---|---|
| CadCraft | 1.4 (its own) |
| BimCraft | 1.4 (its own) |
| ModelCraft | 1.4 (its own) |
| MarkupCraft | 1.4 (its own) |
| TakeoffCraft | 1.4 (its own) |
| CivilCraft | 1.4 (its own) |
| DetailCraft | 1.4 (its own) |
| PartCraft | 1.4 (its own) |
Engines you can build on
Our shared engines (sound, process simulation, networks, frames and FEA, NURBS and more) do the heavy calculation; your add-on adds the commands, panels and checks for its field. Name an engine in your manifest's needs and it comes with your add-on. People never add an engine themselves.
Upload and review
An add-on runs inside the app with the app's own access to the page, so the apps take only add-ons the CadCraft team has read, reviewed and signed. Review checks that the manifest and the permissions it states match the code, that it loads nothing from outside its own folder, that it talks to no server it does not declare, and that its license is one we can sign.
A published version never changes: a fix is a new version. How review works, how long it takes, and what happens when a version is not approved.
Uploads are open to the CadCraft team only for now.