Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 269
Default Desperate for AddNodes msoSegmentCurve Help

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default Desperate for AddNodes msoSegmentCurve Help

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 269
Default Desperate for AddNodes msoSegmentCurve Help

Wow, thanks, Doug. I think this will help!
James

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
DESPERATE FOR HELP!!! edm1007 Excel Discussion (Misc queries) 4 September 6th 08 03:33 AM
Desperate max power Excel Discussion (Misc queries) 0 December 29th 06 01:52 AM
AddNodes msoSegmentCurve Bubb Excel Discussion (Misc queries) 2 May 3rd 06 06:01 PM
In desperate need of help.... mrskitz Excel Discussion (Misc queries) 3 January 13th 06 02:48 PM
Shapes.AddNodes Error on adding next point <0.25 away from prev po Johannes Excel Programming 4 September 28th 05 11:59 AM


All times are GMT +1. The time now is 12:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"