AWESOME!!! Thanks Les!
The only color that doesn't seem to be changing for some reason is the rapid paths. They are stuck on blue no matter what I change or what mode I change to. Weird. Here's the code in case you see something in it.
Code: Select all
local mgr = sc.wxActionManager.Get()
mgr:Execute(sc.actZOOM_JOB)
mgr:Execute(sc.actMODE_START)
local colours = sc.Globals:Get().colours
local cfg = wx.wxFileConfig("", "", "", "", 0)
colours:Save(cfg) --Back up current colours
colours:LoadProfile(2) --white profile
colours:Index("Cut path"):Set(0,0,0)
colours:Index("Feed override"):Set(0,0,0)
colours:Index("Rapid path"):Set(255,255,255)
colours:Index("Inside shape"):Set(0,0,0)
colours:Index("Outside shape"):Set(0,0,0)
colours:Index("Open paths"):Set(0,0,0)
colours:Index("Line end"):Set(255,255,255)
colours:Index("Segment end"):Set(255,255,255)
colours:Index("Background"):Set(255,255,255)
colours:Index("Machine working envelope"):Set(255,255,255)
colours:Index("Machine table"):Set(255,255,255)
colours:Index("Work"):Set(255,255,255)
colours:Index("Material extents"):Set(0,0,0)
colours:Index("Marker"):Set(255,255,255)
colours:Index("Highlight"):Set(0,0,0)
colours:Index("Duplicated part"):Set(0,0,0)
colours:Index("Inactive part"):Set(0,0,0)
colours:Index("Centre marker colour"):Set(255,255,255)
colours:Index("Tabs"):Set(255,255,255)
colours:Index("Grid"):Set(255,255,255)
colours:Index("Start point"):Set(255,255,255)
colours:Index("Locked start point"):Set(255,255,255)
colours:Index("Round tool shank"):Set(255,255,255)
colours:Index("Round tool flutes"):Set(255,255,255)
colours:Index("Turning tool shank"):Set(255,255,255)
colours:Index("Turning tool tip"):Set(255,255,255)
colours:Index("Cut out part"):Set(0,0,0)
sc.Parts:Get():SetDirty(sc.DIRTY_COLOURS) --trigger screen redraw
wx.wxYield()
local path = "C:\\Windows\\Temp\\SCamScreenReport.png"
local bmp = sc.Parts:Get().glDisplay:GetBitmap()
bmp:SaveFile(path, wx.wxBITMAP_TYPE_PNG)
colours:Load(cfg) --restore current colours
sc.Parts:Get():SetDirty(sc.DIRTY_COLOURS)
And the other weird thing is if I use the lines from several posts ago to pop up the job report at the end of the post, the rapid distance, cut time, pierces, etc. all shows up as 0. If I run it by clicking the button after the post finished it works fine.
Code: Select all
function OnFileClosed()
local mgr = sc.wxActionManager.Get()
mgr:Execute(sc.actPOST_ESTIMATE)
end