Skip to main content

Hiding an Axis DRO or Group in Mach

Activate your UseGUIModule by renaming it if it's not already there

C:\Mach4\Profiles\Mill\Macros\Scripts\UserGUIModule.mcs

image.png

Renamed

image.png





Open the UseGUIModule and make the following changes to the UserGUIModule.UserScreenLoadScript function.

Ctrl+F and search for UserGUIModule.UserScreenLoadScript


Make changes from this.

image.png


To this

image.png


function UserGUIModule.UserScreenLoadScript()
------------------ Add user code below this line ------------------ 
m.screen.HideAxis(mc.OB1_Axis)
m.screen.HideAxis(mc.B_Axis)
return true, true, w.FunctionCompleted()
end


The (mc.OB1_Axis) should be changed to the axis you want to hide.  You're basically just un commenting the function and it's FunctionComplete stuff.



make sure to comment out any other stuff you're not using.

image.png

Save, and start Mach4

Hopefully that axis DRO isn't on there anymore.

Pro top:  If you want to toggle showing that DRO on and off.  The easiest thing seems to be to just rename the UseGUIModule to something else, and compile scripts. IF the UseGUIModule isn't doing anything else important I guess.


Hide Other Functions

Follow the same procedure except use the following API for different items. Regenerate scrips to test it. 

Thism.HideGCodeDisplayAndToolPath()

manual

m.screen.HideToolPathDisplay()

would

m.screen.HideSpindleWarmUpGroup()

be

m.screen.HideAllAxis()

m.screen.HideAllOBAxes()

m.screen.HideDwellBar()

 

m.screen.ShowHideSpindleGroup("name", "1") 

In place of "name" you can use the following groups. 

For example, here is code to hide or unhide the ToolDisplayGroup:

m.screen.ShowHideSpindleGroup("ToolDisplayGroup", "1") --Hide
m.screen.ShowHideSpindleGroup("ToolDisplayGroup", "0") --UnHide

 

Here is a lotcomplete betterexample ifof Zionthe didn'code added to the UserGUIModule to hide these groups:

 

function UserGUIModule.UserScreenLoadScript()
------------------ Add user code below this line ------------------ 


m.screen.ShowHideSpindleGroup("ToolDisplayGroup", "1")

m.screen.ShowHideSpindleGroup("SpindleSliderGroup", "1")

------------------ Don't makeEdit it..below this Sorry.line ------------------ 
return true, true, w.FunctionCompleted()
end

 

 

 

 

ToolDisplayGroup

image.png

 

ModalsGroup

image.png

 

FeedRateSliderGroup

image.png

 

SpindleSliderGroup

image.png

 

AdvancedSmallGroup

image.png

 

FileGroup

image.png

 

ToolPathGroup

image.png

 

TopStatusBar

image.png