Sub Main 'Declare the variable that will reference the application Dim SurferApp As Object Set SurferApp = CreateObject("Surfer.Application") SurferApp.Visible = True 'Declares Plot as an object Dim Plot As Object Set Plot = SurferApp.Documents.Add 'Creates surface map and assigns the map frame to the variable "MapFrame" Dim MapFrame1 As Object Set MapFrame1 = Plot.Shapes.AddSurface(GridFileName:=SurferApp.Path+"\samples\demogrid.grd") 'Sets the initial tilt of the map MapFrame1.ViewTilt = 16 'Starts the loop for 0-355 with a step value of 5 For i=0 To 355 Step 5 'Sets the 3D rotation, in degrees MapFrame1.ViewRotation = i 'Exports the map frame to a GIF file Plot.Export(FileName:="C:\temp\3d surface"+i+".gif") 'Goes to the next i value Next i End Sub