#pragma rtGlobals=3 // Use modern global access method and strict wave access. FUNCTION GoGizmo() Make /O/N=(50, 50) Surf1= enoise(10), Surf2 = enoise(10) + p Variable GizmoL = 0, GizmoT = 44, GizmoR = 720, GizmoB = 764 String cmdString = "NewGizmo /W=("+num2str(GizmoL)+", "+num2str(GizmoT)+ ", " cmdString += num2str(GizmoR)+", "+num2str(GizmoB)+"); " cmdString += "AppendToGizmo /D axes=boxaxes, name=axes0;" cmdString += "AppendToGizmo /D surface=surf1, name=surf1;" cmdString += "AppendToGizmo /D surface=surf2, name=surf2" Execute cmdString // Make a panel to hold colortable dropdown lists NewPanel /W=(GizmoR - 370, GizmoB + 26, GizmoR, GizmoB + 86)/K=1 // Not finding a better option I used GetGizmo ObjectNameList below // to get the names of the Gizmo plot objects. Ideally I'd // like to sort out which objects are surfaces and which are not. // // I thought about using GetGizmo ObjectList and then searching through // the result for the string "surface = " and then stripping out that command // between the semicolons, and then isolating the portion that defines // "name = " to get the name but that just seems clunky. Better ideas? cmdString = "GetGizmo ObjectNameList" Execute cmdString String /G S_ObjectNames String ObjectNames = "\"" + S_ObjectNames + "\"" PopUpMenu GizmoObjects_menu, value = #ObjectNames, pos = {10, 5} PopUpMenu ColorTable_menu, value="*COLORTABLEPOP*", Pos = {100, 5}, Proc = ColorTabMenu_Action END //--------------------------------------- FUNCTION ColorTabMenu_Action(ctrlName, popNum, popStr) : PopUpMenuControl String ctrlName Variable popNum String popStr // Populate S_value with selected object name ControlInfo GizmoObjects_menu String obj = S_value String ExecString = "ModifyGizmo ModifyObject = "+obj+", property = {surfaceCtab, "+popStr+"}" Execute ExecString END