how to get rotation and insertion pt from a block using LISP?

Discussion in 'AutoCAD' started by Joe, Dec 2, 2003.

  1. Joe

    Joe Guest

    I need to find and check the insertion point and the rotation, in
    degrees, of a set of blocks in a drawing. The idea is to update the
    block with one of the same name that has a different insertion point.I
    need the block to occupy the same location as the previous one. The
    previous black has an offset insertion point and the new one is in the
    center of the block. Any ideas? Thanks, Joe
     
    Joe, Dec 2, 2003
    #1
  2. Joe

    Tom Berger Guest

    The insertion point is stored in DXF group 10, and the rotation in
    group 50 (radians - PI equals 180 degrees). Use
    (entget (car (entsel)))
    to see what I mean.

    You can use my SSMOD function for any dxf modification of any entity.
    It is free and you can download it from
    http://www.archdim.de/ssmod.lsp

    To replace the block reference (block name) of an insert entity, you
    simply use (ssmod (ssget) 2 <newblockname>), to give it an new
    insertion point you use (ssmod (ssget) 10 <newinsertionpoint>), and
    to give it a new rotation angle you use (ssmod (ssget) 50
    <newrotation>)

    Tom Berger
     
    Tom Berger, Dec 2, 2003
    #2
  3. Joe

    Joe Guest

    Thanks for the info, Tom. I will try it out and see where I get to. I
    am fairly familiar with the commands that you suggest. Thanks also for
    your code. I will look it over as well.
     
    Joe, Dec 7, 2003
    #3
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.