How to find arc center

Discussion in 'AutoCAD' started by Adesu, Oct 28, 2004.

  1. Adesu

    Adesu Guest

    I just to search arc center, first by dxf the result = nil,second by vlax
    this result got problem too

    _$ (setq ent (entget (car en)))
    ((-1 . <Entity name: 14c2588>) (0 . "ARC") (330 . <Entity name: 14c24f8>) (5
    .. "49") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0") (100 .
    "AcDbCircle") (10 10.9142 -0.490689 0.0) (40 . 12.6097) (210 0.0 0.0 1.0)
    (100 . "AcDbArc") (50 . 0.658431) (51 . 2.2417))

    _$ (setq info20 (assoc 20 ent))
    nil

    $ (vl-load-com)
    (setq ent
    (vlax-ename->vla-object
    (car
    (entsel "\nSELECT AN ARC: "))))
    #<VLA-OBJECT IAcadArc 01aade74>

    _$ (setq ent1 (rtos (vlax-get-property ent "Center")))
    ; error: bad argument type: numberp: #<variant 8197 ...>
    _$

    Anybody know how to find arc center?,thanks.
     
    Adesu, Oct 28, 2004
    #1
  2. Adesu

    Jimmy D Guest

    Hi Adesu,

    Shouldn't the groupcode be 10 instead of 20?

    (setq ent (entget (car en)))
    (setq CEN (assoc 10 ent))
     
    Jimmy D, Oct 28, 2004
    #2
  3. Adesu

    BillZ Guest

    (setq ent1 (vlax-safearray->list (vlax-variant-value (vlax-get-property ent "Center"))))

    (28.3631 19.0772 0.0)


    Bill
     
    BillZ, Oct 28, 2004
    #3
  4. or....

    (vlax-get (vlax-ename->vla-object (car (entsel))) 'center)

    --
    Autodesk Discussion Group Facilitator



    (vlax-ename->vla-object (car (entsel)))))))
     
    Jason Piercey, Oct 28, 2004
    #4
  5. Adesu

    Joe Burke Guest

    Bill,

    Suggestion, no need for the safearray and variant stuff.

    Command: (vlax-get (vlax-ename->vla-object (car (entsel))) 'Center)
    Select object: (812.871 340.75 0.0)

    Joe Burke
     
    Joe Burke, Oct 28, 2004
    #5
  6. Adesu

    Joe Burke Guest

    Hi Jason. :)

    Joe Burke
     
    Joe Burke, Oct 28, 2004
    #6
  7. Hi Joe :)
     
    Jason Piercey, Oct 28, 2004
    #7
  8. Adesu

    BillZ Guest

    Hmmm,

    I learn something new everyday. :)

    Thanks Jason! Eh, Joe.

    Bill
     
    BillZ, Oct 28, 2004
    #8
  9. Adesu

    Adesu Guest

    HI Jimmy,BillZ,Jason,Joe thanks a lot for you alls
     
    Adesu, Oct 29, 2004
    #9
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.