FreeFormBuilder Bug?

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top