+ Reply to Thread
Results 1 to 4 of 4

Drawing Arcs

  1. #1
    PraxisPete
    Guest

    Drawing Arcs

    Hi Everybody, I am running Excel 2002 and using VB to draw shapes on my
    worksheet, but I need to draw arcs by providing the start and finish points
    and the radius. Is there a way to do this in Excel, or does anyone know of
    an Add-in that could achieve this?

    Many thanks in advance.


  2. #2
    Mexage
    Guest

    RE: Drawing Arcs

    Dear Praxis Pete:

    I recorded a macro in Excel 2003 and I got the following:

    ActiveSheet.Shapes.AddShape(msoShapeArc, 258#, 68.25, 114#, 89.25).Select
    Selection.ShapeRange.Adjustments.Item(2) = 144.7255

    The first line draws the arc in coordinate (258,62.25), width 114, height
    89.25
    And then modifies the ending angle to 144.7255

    Try recording a macro (use the drawing toolbar to draw the arc in autoshapes)

    Hope this helps, if it does, please rate this post.
    G.Morales.


    "PraxisPete" wrote:

    > Hi Everybody, I am running Excel 2002 and using VB to draw shapes on my
    > worksheet, but I need to draw arcs by providing the start and finish points
    > and the radius. Is there a way to do this in Excel, or does anyone know of
    > an Add-in that could achieve this?
    >
    > Many thanks in advance.
    >


  3. #3
    PraxisPete
    Guest

    RE: Drawing Arcs

    Dear G.Morales

    I tried recording a macro and found that i could change the start and end
    points, and scale the arc but I cannot see how to specify the radius.

    Thanks for replying.


    "Mexage" wrote:

    > Dear Praxis Pete:
    >
    > I recorded a macro in Excel 2003 and I got the following:
    >
    > ActiveSheet.Shapes.AddShape(msoShapeArc, 258#, 68.25, 114#, 89.25).Select
    > Selection.ShapeRange.Adjustments.Item(2) = 144.7255
    >
    > The first line draws the arc in coordinate (258,62.25), width 114, height
    > 89.25
    > And then modifies the ending angle to 144.7255
    >
    > Try recording a macro (use the drawing toolbar to draw the arc in autoshapes)
    >
    > Hope this helps, if it does, please rate this post.
    > G.Morales.
    >
    >
    > "PraxisPete" wrote:
    >
    > > Hi Everybody, I am running Excel 2002 and using VB to draw shapes on my
    > > worksheet, but I need to draw arcs by providing the start and finish points
    > > and the radius. Is there a way to do this in Excel, or does anyone know of
    > > an Add-in that could achieve this?
    > >
    > > Many thanks in advance.
    > >


  4. #4
    Mexage
    Guest

    RE: Drawing Arcs

    You can't specify the radius directly, but you can use the width and height.

    You could make a sub such as:

    sub DrawArc(single x, single y, single r, single start, single finish)

    ActiveSheet.Shapes.AddShape(msoShapeArc, x, y, r, r).Select
    Selection.ShapeRange.Adjustments.Item(1) = start
    Selection.ShapeRange.Adjustments.Item(2) = finish

    end sub


    Hope that helps; if it does, please rate this post.

    "PraxisPete" wrote:

    > Dear G.Morales
    >
    > I tried recording a macro and found that i could change the start and end
    > points, and scale the arc but I cannot see how to specify the radius.
    >
    > Thanks for replying.
    >
    >
    > "Mexage" wrote:
    >
    > > Dear Praxis Pete:
    > >
    > > I recorded a macro in Excel 2003 and I got the following:
    > >
    > > ActiveSheet.Shapes.AddShape(msoShapeArc, 258#, 68.25, 114#, 89.25).Select
    > > Selection.ShapeRange.Adjustments.Item(2) = 144.7255
    > >
    > > The first line draws the arc in coordinate (258,62.25), width 114, height
    > > 89.25
    > > And then modifies the ending angle to 144.7255
    > >
    > > Try recording a macro (use the drawing toolbar to draw the arc in autoshapes)
    > >
    > > Hope this helps, if it does, please rate this post.
    > > G.Morales.
    > >
    > >
    > > "PraxisPete" wrote:
    > >
    > > > Hi Everybody, I am running Excel 2002 and using VB to draw shapes on my
    > > > worksheet, but I need to draw arcs by providing the start and finish points
    > > > and the radius. Is there a way to do this in Excel, or does anyone know of
    > > > an Add-in that could achieve this?
    > > >
    > > > Many thanks in advance.
    > > >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1