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.
|
|
Thank you for rating this answer.
|
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
|
| Attachments |
|
No attachments were found.
|