'HideAxes.bas ' 'Eliminates ticks and labels and hides the axes from selected maps in open SRF plot. Ignores selected objects that are not maps. ' 'Does not work for maps grouped into composite objects. Sub Main Debug.Clear 'Use existing Surfer instance. On Error GoTo Error1: Set surf = GetObject(, "Surfer.Application") On Error GoTo 0 Set document = surf.ActiveDocument If document.Type <> srfDocPlot Then GoTo Error2: Debug.Print "Surfer Version: " & surf.Version Debug.Print "Document: " & surf.ActiveDocument Set selection = document.Selection i = 0 For Each obj In selection If obj.Type = srfShapeMapFrame Then i = i + 1 Debug.Print "Modified Map" & i & ": " & obj.Name shrinkAxes(obj) End If Next obj If i = 0 Then GoTo Error3: GoTo Xit: Error1: Debug.Clear Debug.Print "Surfer is not running. Start Surfer, open a document, and select maps to modify." GoTo Xit: Error2: Debug.Clear Debug.Print "Active document is not a plot. Open or activate a plot document and select a maps to modify." GoTo Xit: Error3: Debug.Clear Debug.Print "No maps selected. Select some maps to modify." Debug.Print "Make sure your maps are Not inside a composite Object." GoTo Xit: Xit: End Sub Public Function shrinkAxes(frame As Object) For Each axis In frame.Axes axis.ShowLabels = False axis.MajorTickType = srfTickNone axis.MinorTickType = srfTickNone axis.Visible = False Next axis End Function