A
atpgroups
I am trying to place lines on a chart (contour lines in a colour
plot).
Below is a bit of sample code which shows the issue (it needs a chart
to exist and be selected to run). For some reason Excel seems to
scramble the node coordinates. (but only sometimes, hence the rather
specific values)
Sub ctest()
Dim ch As Chart
Set ch = ActiveChart
Dim sh As FreeformBuilder, p As Shape
Set sh = ch.Shapes.BuildFreeform(msoEditingAuto, 417.834413382186,
112.243677843221)
sh.AddNodes msoSegmentLine, msoEditingAuto, 408.377347163292,
119.024547401276
Set p = sh.ConvertToShape
MsgBox "x = " & p.Nodes(1).Points(1, 1) & " Y = " & p.Nodes(1).Points
(1, 2) & vbCr & "x = " & p.Nodes(2).Points(1, 1) & " Y = " & p.Nodes
(2).Points(1, 2)
End Sub
plot).
Below is a bit of sample code which shows the issue (it needs a chart
to exist and be selected to run). For some reason Excel seems to
scramble the node coordinates. (but only sometimes, hence the rather
specific values)
Sub ctest()
Dim ch As Chart
Set ch = ActiveChart
Dim sh As FreeformBuilder, p As Shape
Set sh = ch.Shapes.BuildFreeform(msoEditingAuto, 417.834413382186,
112.243677843221)
sh.AddNodes msoSegmentLine, msoEditingAuto, 408.377347163292,
119.024547401276
Set p = sh.ConvertToShape
MsgBox "x = " & p.Nodes(1).Points(1, 1) & " Y = " & p.Nodes(1).Points
(1, 2) & vbCr & "x = " & p.Nodes(2).Points(1, 1) & " Y = " & p.Nodes
(2).Points(1, 2)
End Sub