+ Reply to Thread
Results 1 to 5 of 5

Shapes.AddNodes Error on adding next point <0.25 away from prev po

  1. #1
    Johannes
    Guest

    Shapes.AddNodes Error on adding next point <0.25 away from prev po

    I always get error message saying that the object or the method is not
    supported when I call the AddNodes (or even draw polygon, the function that
    you input 2 Dimensional array of point coord) that is <0.25 on X or <0.25 on
    Y away from prev point. As soon as I inc the value to equal or higher than
    0.25, the error message dissapear. Is this a bug?

  2. #2
    NickHK
    Guest

    Re: Shapes.AddNodes Error on adding next point <0.25 away from prev po

    Johannes,
    Not that I use Shapes much, but XL2000 does not have "Shapes.AddNodes".
    Anyway, a related issue may be:

    http://www.mrexcel.com/archive2/67600/78336.htm

    NickHK

    "Johannes" <[email protected]> wrote in message
    news:[email protected]...
    > I always get error message saying that the object or the method is not
    > supported when I call the AddNodes (or even draw polygon, the function

    that
    > you input 2 Dimensional array of point coord) that is <0.25 on X or <0.25

    on
    > Y away from prev point. As soon as I inc the value to equal or higher than
    > 0.25, the error message dissapear. Is this a bug?




  3. #3
    Johannes
    Guest

    Re: Shapes.AddNodes Error on adding next point <0.25 away from pre

    Sorry, I mean the var of type freeform builder. Will get the error at the
    time I set it to shape (so can be visible on Excel worksheet).
    Btw, I'm using Office 2003 with all the patches avail in Windows Update
    (more appropriately Office Update).
    I went to the link from Nick, it didn't provide answer to my Q.

    <CODE>
    Dim shpMyGreatShape As Shape
    Dim ffbMyFreeForm As FreeformBuilder
    Set ffbMyFreeForm = ActiveSheet.Shapes.BuildFreeform(msoEditingAuto,
    300, 200)
    With ffbMyFreeForm
    .AddNodes msoSegmentLine, msoEditingAuto, 300.1, 200 'if changed the
    X,Y to bigger distance away from 300,200, will NOT get error below
    Set shpMyGreatShape = .ConvertToShape 'will get error here
    End With
    </CODE>


    "NickHK" wrote:

    > Johannes,
    > Not that I use Shapes much, but XL2000 does not have "Shapes.AddNodes".
    > Anyway, a related issue may be:
    >
    > http://www.mrexcel.com/archive2/67600/78336.htm
    >
    > NickHK
    >
    > "Johannes" <[email protected]> wrote in message
    > news:[email protected]...
    > > I always get error message saying that the object or the method is not
    > > supported when I call the AddNodes (or even draw polygon, the function

    > that
    > > you input 2 Dimensional array of point coord) that is <0.25 on X or <0.25

    > on
    > > Y away from prev point. As soon as I inc the value to equal or higher than
    > > 0.25, the error message dissapear. Is this a bug?

    >
    >
    >


  4. #4
    NickHK
    Guest

    Re: Shapes.AddNodes Error on adding next point <0.25 away from pre

    Johannes,
    Well, I'm using Excel 2000 so have exactly the problem indicated in the
    link. So I can't help.

    Did you try the suggestion of:
    Set Poly = ActiveSheet.Drawings.Add(145, 9.75, 140, 9.75, False)
    Poly.AddVertex 145, 19.75

    NickHK

    "Johannes" <[email protected]> wrote in message
    news:[email protected]...
    > Sorry, I mean the var of type freeform builder. Will get the error at the
    > time I set it to shape (so can be visible on Excel worksheet).
    > Btw, I'm using Office 2003 with all the patches avail in Windows Update
    > (more appropriately Office Update).
    > I went to the link from Nick, it didn't provide answer to my Q.
    >
    > <CODE>
    > Dim shpMyGreatShape As Shape
    > Dim ffbMyFreeForm As FreeformBuilder
    > Set ffbMyFreeForm = ActiveSheet.Shapes.BuildFreeform(msoEditingAuto,
    > 300, 200)
    > With ffbMyFreeForm
    > .AddNodes msoSegmentLine, msoEditingAuto, 300.1, 200 'if changed

    the
    > X,Y to bigger distance away from 300,200, will NOT get error below
    > Set shpMyGreatShape = .ConvertToShape 'will get error here
    > End With
    > </CODE>
    >
    >
    > "NickHK" wrote:
    >
    > > Johannes,
    > > Not that I use Shapes much, but XL2000 does not have "Shapes.AddNodes".
    > > Anyway, a related issue may be:
    > >
    > > http://www.mrexcel.com/archive2/67600/78336.htm
    > >
    > > NickHK
    > >
    > > "Johannes" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > I always get error message saying that the object or the method is not
    > > > supported when I call the AddNodes (or even draw polygon, the function

    > > that
    > > > you input 2 Dimensional array of point coord) that is <0.25 on X or

    <0.25
    > > on
    > > > Y away from prev point. As soon as I inc the value to equal or higher

    than
    > > > 0.25, the error message dissapear. Is this a bug?

    > >
    > >
    > >




  5. #5
    okaizawa
    Guest

    Re: Shapes.AddNodes Error on adding next point <0.25 away from pre

    Hi,

    I tested the following code in Excel 2000. if there are nodes close to
    each other then the ConvertToShape method fails. SetPosition and Insert
    method work. it also happened in Excel 97. but I don't know if it is
    the same in later versions.

    Sub Test1()
    With ActiveSheet.Shapes.BuildFreeform(msoEditingAuto, 10, 10)
    .AddNodes msoSegmentLine, msoEditingAuto, 10.25, 10.25
    .AddNodes msoSegmentLine, msoEditingAuto, 10, 10.25
    .AddNodes msoSegmentLine, msoEditingAuto, 10, 10
    .ConvertToShape.Select ' shows Run time error 1004:
    'Application defined or object defined error
    End With
    End Sub

    Sub Test2()
    With ActiveSheet.Shapes.BuildFreeform(msoEditingAuto, 10, 10)
    .AddNodes msoSegmentLine, msoEditingAuto, 100, 100
    With .ConvertToShape
    .Nodes.SetPosition 2, 10.25, 10.25
    .Nodes.Insert 2, msoSegmentLine, msoEditingAuto, 10, 10.25
    .Nodes.Insert 3, msoSegmentLine, msoEditingAuto, 10, 10
    End With
    End With
    End Sub

    --
    HTH,

    okaizawa


    Johannes wrote:
    > Sorry, I mean the var of type freeform builder. Will get the error at the
    > time I set it to shape (so can be visible on Excel worksheet).
    > Btw, I'm using Office 2003 with all the patches avail in Windows Update
    > (more appropriately Office Update).
    > I went to the link from Nick, it didn't provide answer to my Q.
    >
    > <CODE>
    > Dim shpMyGreatShape As Shape
    > Dim ffbMyFreeForm As FreeformBuilder
    > Set ffbMyFreeForm = ActiveSheet.Shapes.BuildFreeform(msoEditingAuto,
    > 300, 200)
    > With ffbMyFreeForm
    > .AddNodes msoSegmentLine, msoEditingAuto, 300.1, 200 'if changed the
    > X,Y to bigger distance away from 300,200, will NOT get error below
    > Set shpMyGreatShape = .ConvertToShape 'will get error here
    > End With
    > </CODE>
    >
    >


+ 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