Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry to harp on this. I need an explanation of the AddNodes
msoSegmentCurve arguments. Or, is there a site that goes into this? Thanks! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Zone,
I'm not sure what help you need, but you inspired me to dust off my algebra and draw a circle. I'd never coded a shape before, so first I read help, then turned on the macro recorder and drew some curves to see how it works. I'm not sure what the difference between "auto" and "corner" is. X and Y are obviously coordinates - here I calculated them as the points in the circumference: Sub draw_circle() Dim free_form As Shape Dim ctr As Double Dim rad As Double Dim known_side As Single For Each free_form In ActiveSheet.Shapes free_form.Delete Next free_form ctr = 150 rad = 100 With ActiveSheet.Shapes.BuildFreeform(msoEditingAuto, ctr - 100, ctr - unknown_side(rad, -100)) For known_side = -99 To 100 .AddNodes msoSegmentCurve, msoEditingAuto, (ctr + known_side), (ctr - unknown_side(rad, known_side)) Debug.Print "k " & known_side & " u " & unknown_side(rad, known_side) Next known_side For known_side = -100 To 100 .AddNodes msoSegmentCurve, msoEditingAuto, (ctr - known_side), (ctr + unknown_side(rad, known_side)) Debug.Print "k " & known_side & " u " & unknown_side(rad, known_side) Next known_side .ConvertToShape.Select End With End Sub Function unknown_side(known_side, rad) As Single 'remember Pythagorus? unknown_side = Sqr(Abs((rad * rad) - (known_side * known_side))) End Function I don't know if that helps... Doug "Zone" wrote in message oups.com... Sorry to harp on this. I need an explanation of the AddNodes msoSegmentCurve arguments. Or, is there a site that goes into this? Thanks! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Wow, thanks, Doug. I think this will help!
James |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
DESPERATE FOR HELP!!! | Excel Discussion (Misc queries) | |||
Desperate | Excel Discussion (Misc queries) | |||
AddNodes msoSegmentCurve | Excel Discussion (Misc queries) | |||
In desperate need of help.... | Excel Discussion (Misc queries) | |||
Shapes.AddNodes Error on adding next point <0.25 away from prev po | Excel Programming |