Move all to origin help

Discussion in 'AutoCAD' started by Dr Fleau, Jul 21, 2005.

  1. Dr Fleau

    Dr Fleau Guest

    I tried to write a routine in LISP that would take everything in the
    drawing, extract the lower left-most point (as in BOUNDINGBOX lower
    left) and move that point to (0,0).

    I've managed to get lines and plines alright, but I'm stuck with
    circles, ellipses and the like.

    Quick exposure: it's for a metalworking machine that uses (0,0) as the
    start point for a plasma cutter. I would typically use this on simple
    geometric figures on 1 layer (0), not a 12-storey building ventilation
    and wiring diagram.

    I did try to use BOUNDINGBOX in vba, but quickly had to fight off the
    urge to chuck my monitor and tower into the street; I'm not quite
    confortable with vb yet.

    Any help ?

    Power to the peephole

    Dr Fleau
     
    Dr Fleau, Jul 21, 2005
    #1
  2. Dr Fleau

    Fatfreek Guest

    (vla-getboundingbox
    (vlax-ename->vla-object (car (entsel)))
    'minpt
    'maxpt
    )
    (setq LowLeftPt
    (vlax-safearray->list minpt)
    )
    (setq UpRightPt
    (vlax-safearray->list maxpt)
    )
     
    Fatfreek, Jul 27, 2005
    #2
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.