how to get the segment width of polyline with activex (vla)?

Discussion in 'AutoCAD' started by dream0001, Oct 11, 2004.

  1. dream0001

    dream0001 Guest

    for a lwpolyline obj, i want to get the width at a Index.
    i do this with:
    (vla-getwidth obj par 'wid1 'wid2)
    but it return false. who can tell me why?
    in the help:
    object.GetWidth Index, StartWidth, EndWidth
    StartWidth
    Double; output-only
    The start width of the polyline at the given index.
     
    dream0001, Oct 11, 2004
    #1
  2. Dream0001,

    You have the correct code - check the values for wid1 and wid2 after using the getwidth method.

    Peter
     
    petersciganek, Oct 11, 2004
    #2
  3. dream0001

    dream0001 Guest

    i use acad2004
    but it really don't work :(.
    and prompt wid1 can't be trans to variant
     
    dream0001, Oct 11, 2004
    #3
  4. A bug in 2004? I'm still with R15 and it works.

    Peter
     
    petersciganek, Oct 11, 2004
    #4
  5. dream0001

    BillZ Guest

    Works here in R2005.

    Specify start point:
    Current line-width is 0.0000
    Specify next point or [Arc/Halfwidth/Length/Undo/Width]:
    Specify next point or [Arc/Close/Halfwidth/Length/Undo/Width]:
    Specify next point or [Arc/Close/Halfwidth/Length/Undo/Width]:
    Specify next point or [Arc/Close/Halfwidth/Length/Undo/Width]:
    Specify next point or [Arc/Close/Halfwidth/Length/Undo/Width]:
    Specify next point or [Arc/Close/Halfwidth/Length/Undo/Width]:
    Specify next point or [Arc/Close/Halfwidth/Length/Undo/Width]:
    Specify next point or [Arc/Close/Halfwidth/Length/Undo/Width]:

    Command: (setq obj (vlax-ename->vla-object (car(entsel))) INDEX 0)

    Select object: 0

    Command: (vla-getwidth obj index 'wid1 'wid2)
    nil

    Command: !WID1
    0.0

    Command: !WID2
    0.0

    Bill
     
    BillZ, Oct 11, 2004
    #5
  6. dream0001

    LUCAS Guest

    LUCAS, Oct 12, 2004
    #6
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 (here). After that, you can post your question and our members will help you out.