Can I write my own gadget? What are Lua and the Gadget SDK?
Updated Oct 13, 20263 min readVCarve Pro & Aspire
Short answer
Yes. Gadgets are add-in tools written in a programming language called Lua. The software maker publishes a Gadget SDK for people who want to write their own. It takes real programming skill, and the maker does not offer one-to-one help with it.
What a gadget can do
The official developer page says gadgets have access to a number of features and objects inside a running copy of the program, and can be used to create and manipulate both geometry and toolpaths. The gadgets in the official library show the range: drawing vectors from a few numbers (gears, spirals), building toolpaths the standard forms do not offer (dovetails with an end mill), importing data into components, and saving files.
How to get the SDK
- Go to the Developer Info page of the official gadget library.
- Follow the link under the SDK heading. The SDK is itself published as a gadget named Gadget SDK, listed for versions 10.5, 11 and 12.
- Install it like any other gadget with Gadgets > Install New Gadget.
- Per the library page, installing it places sample files and the Lua API documentation in the usual gadget installation area. Open it with File > Open Application Data Folder, then the Gadgets folder.
What to expect
- The developer page is direct about support: documentation for the interfaces and objects is provided, but individual questions about any aspect of gadget creation are not answered. The manual repeats this, stating the SDK and tutorials are provided as is.
- The manual points to the gadgets section of the software maker's user forum as the place where the maker and fellow users post news and releases. That is where peer help happens.
- The manual also warns that gadgets in general are not as polished as built-in features. They are meant for minority needs.
Should you bother?
- Worth it when you repeat the same multi-step task many times and already write code in some language.
- Probably not worth it for a one-off. Toolpath templates, job templates and document variables cover a lot of repeat work with no code. See the entries on those features first.
- If you cannot program, look for an existing gadget before commissioning one.
Pro tips
- Learn from the SDK samples before starting your own. They show how a working gadget is laid out.
- Test a new gadget on a copy of a job, never on the only copy of real work.
- A gadget is tied to the program version it was written for. Expect to retest after a major upgrade.
Sources and further reading
Developer Info - V12the software maker's gadgets site (opens in a new tab)Gadget SDK - V12the software maker's gadgets site (opens in a new tab)Gadgetsthe software maker's documentation (opens in a new tab)Still stuck? Ask the community
Ask in your own words. Vector answers first, from the guides. If that does not cover it, post it to members and the shop from there.