Anyone have a lisp program to change all entities Y coordinations are the same

Discussion in 'AutoCAD' started by Ken, Sep 14, 2004.

  1. Ken

    Ken Guest

    Anyone have a lisp program to change all entities Y coordination are the
    same

    thx

    Ken
     
    Ken, Sep 14, 2004
    #1
  2. Ken

    Paul Turvill Guest

    Huh?
    ___
     
    Paul Turvill, Sep 14, 2004
    #2
  3. Ken

    Ken Guest

    or in another word, change all insert point save X or Y coordinate.

    Ken
     
    Ken, Sep 14, 2004
    #3
  4. Ken

    Ken Guest

    or in another word, change all insert point same X or Y coordinate.

    Ken
     
    Ken, Sep 14, 2004
    #4
  5. Ken

    Paul Turvill Guest

    What "entities"? Are you talking about blocks? Text? You can change the Y
    coordinate of objects that actually *have* an insertion point with the
    PROPERTIES window.
    ___
     
    Paul Turvill, Sep 14, 2004
    #5
  6. Why don't you "Move" all ??

    Matti
     
    Matti Pitkänen, Sep 14, 2004
    #6
  7. Ken

    Fatty Guest

    ;Try this:

    (setq source '((10. 20.)(20. 30.)(40. 50.)))
    ; To change X-coord's:

    (setq new_x 100.)
    (setq a (list (list new_x 0.)))
    (setq target
    (mapcar '(lambda (x) (mapcar '+ (car a) x)) source)
    )

    ; To change Y-coord's:

    (setq new_y 100.)
    (setq a (list (list 0. new_y)))
    (setq target
    (mapcar '(lambda (x) (mapcar '+ (car a) x)) source)
    )

    Best regards,
    Fatty
     
    Fatty, Sep 14, 2004
    #7
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.