Script46_AddNewWorkspace.lua
-- Lua example for Autodesk Netfabb 2024
-- Adds a machine workspace to the project tree,
-- fetching either from a custom template from "My machines", if available,
-- or from a default, built-in template
-- The the workspace ID for a machine called "Fuse 1" in the "My Machines" list
workspaceID = netfabbtrayhandler:getmachineidentifier("Fuse 1")
-- If no such machine was found we can use the value of the "uuid" attribute of
-- the corresponding workspacedefinition in workspaces.xml
if workspaceID == "" then
workspaceID = "691361E2-6F01-4F7E-BE38-529A531BB41D"
end
-- Create a new tray. If a machine from the "My Machines" list
-- was used it also contains the settings of this particular
-- machine, otherwise it comes with the default settings.
newTray = netfabbtrayhandler:addworkspace(workspaceID)