Search the Knowledgebase |
Browse by Category |
|
|
|
| How can I draw a circle around a point at a defined radius? |
| User Opinions |
0%
100%
|
|
Thank you for rating this answer.
|
You can draw a circle at a particular radius from a drawn point via a script (see below). You may be able to modify it for a point in a post map.
********** Sub Main
Dim SurferApp As Object Set SurferApp = CreateObject("Surfer.Application") SurferApp.Visible = True
Dim Plot As Object Set Plot = SurferApp.Documents.Add(srfDocPlot) Dim Shapes As Object Set Shapes = Plot.Shapes
Dim Location As Object Set Location = Shapes.AddSymbol(x:=4, y:=3)
'Select which point you want to draw the circle around, export to BLN and view the coordinates of the point Location.Select Plot.Export("c:\temp\testpoint.bln", True) Dim Wks As Object Set Wks = SurferApp.Documents.Open(FileName:="c:\temp\testpoint.bln") Xcoord = Wks.Cells(Row:=2, Col:=1) Ycoord = Wks.Cells(Row:=2, Col:=2)
'Add or subtract your buffer value from the point coordinates to create the circle Buffer=5 Dim Ellipse As Object Set Ellipse = Shapes.AddEllipse(Left:=Xcoord-1, Top:=Ycoord+1, Right:=Xcoord+1, Bottom:=Ycoord-1)
Wks.Close
End Sub
|
| Visitor Comments |
|
No visitor comments posted. Post a comment
|
| Attachments |
|
No attachments were found.
|