Knowledgebase Home | Contact Knowledgebase Home| Contact
Search the Knowledgebase Browse by Category
How can I turn off the visibilty of a map? Normally I would uncheck the object in the Object Manager.
User Opinions
No users have voted.

How would you rate this answer?
Helpful
Not helpful

Use the Visible Property for the Shape object to turn the visibility of maps on/off. For example, see below.

For more information, please see Help / Surfer Automation Help / Objects / Shape Object. Click on the Visible property.

***************
Sub Main

Dim Surf As Object
Set Surf = CreateObject("Surfer.Application")
Surf.Visible = True

Set Doc = Surf.Documents.Add
Set Shapes = Doc.Shapes

Set Demo = Shapes.AddPostMap(Surf.Path + "\samples\demogrid.dat")
Dim Overlays As Object
Demo.Overlays(1).Name = "Demo"
Demo.Overlays(1).Symbol.Color = srfColorGreen

Set Sample = Shapes.AddPostMap(Surf.Path + "\samples\sample3.dat")
Sample.Overlays(1).Name = "Sample"
Sample.Overlays(1).Symbol.Color = srfColorBlue

Shapes.SelectAll
Set Sel = Doc.Selection
Sel.OverlayMaps
Sel.DeselectAll

Doc.SaveAs(FileName:=Surf.Path+"\Samples\test.srf")

Shapes.Item(1).Overlays("Sample").Visible = False

Doc.Export(FileName:=Surf.Path+"\Samples\test.jpg", Options:="Width=300, Height=300")

End Sub

Visitor Comments
No visitor comments posted. Post a comment
Related Questions
Attachments
No attachments were found.
Post Comment for "How can I turn off the visibilty of a map? Normally I would uncheck the object in the Object Manager."
To post a comment for this question, simply complete the form below. Fields marked with an asterisk are required.
   Name:
   Email:
* Comment:
Continue
Powered by ActiveKB Knowledgebase Software

Home * Products * Gallery * Support * About Us * Register * Order * Demos