get xy coordinates of insertion point of blocks into attributes

Discussion in 'AutoCAD' started by tpatton10, Nov 30, 2005.

  1. tpatton10

    tpatton10 Guest

    I need a LSP that will get (without picking the block) the insertion
    point of all blocks already inserted into a drawing with the block
    names "SCP_IN" or "SCP_OUT" and store the insertion point x,y
    coordinates in an attribute named CORDS of each block.

    Can any of you help with this?
    Thanks!
     
    tpatton10, Nov 30, 2005
    #1
  2. tpatton10

    Paul Turvill Guest

    Actually it represents a good opportunity to explore writing a bit of LISP
    for yourself.

    (setq ss (ssget "x" '((0 . "INSERT"))))
    will make a selection set of all of the blocks in your drawing; then it's
    just a matter of stepping through the selection set, extracting the block
    name (DXF group 2) and insertion point (DXF group 10), then exporting to a
    file of your choice.
    ___
     
    Paul Turvill, Dec 1, 2005
    #2
  3. tpatton10

    mshinu Guest

    mshinu, Dec 2, 2005
    #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.