This section is for general discussion about Gadgets
- Posts: 20
- Joined: Tue Nov 06, 2012 4:47 am
- Model of CNC Machine: Legacy Maverick 4x8, BOSS laser
- Location: Los Altos Hills, CA
How do I display a menu with all the layers in the design?
I can get a list of the layers with the following, but how do I get that into the HTML?
Code: Select all
local job = VectricJob()
if not job.Exists then
DisplayMessageBox("No job loaded")
local active_layer = job.LayerManager:GetActiveLayer()
local pos = layer_manager:GetHeadPosition()
while pos ~= nil do
layer, pos = layer_manager:GetNext(pos)
layers[#layers+1] = layer
- Vectric Archimage
- Posts: 11293
- Joined: Thu Nov 23, 2006 2:19 pm
- Model of CNC Machine: ShopBot PRS Alpha 96x48
- Location: Surrey, UK
Depends how you want to display it. It's all HTML rather than Lua. You could build and HTML table, create a dropdown or a large list/edit box. Look up how you would do it for a web site and just build the same code in a Lua variable and display it with the HTML commands in the SDK.