transfer object thru space...

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

  1. Devronious

    Devronious Guest

    I need to take something that I've created in model space and transfer it
    into a block. Is that possible using activex?

    Thanks,

    Devin
     
    Devronious, Sep 14, 2004
    #1
  2. Devronious

    Jeff Mishler Guest

    Yes. Something like this.....
    Create the entity, assign it to a variable as a vla-object:
    (setq ent (vlax-ename->vla-object (car (entsel))));or something similar
    Get the block from the blocks collection:
    (setq block (vla-item (vla-get-blocks
    (vla-get-activedocument(vlax-get-acad-object))) "YOURBLOCKNAME"))
    Add the item to the block:
    (vlax-invoke (vla-get-activedocument (vlax-get-acad-object)) "copyobjects"
    (list ent) block pairs)
    Delete the original:
    (vla-delete ent)
     
    Jeff Mishler, Sep 14, 2004
    #2
  3. Devronious

    Devronious Guest

    Thanks Jeff, I probably never would have found that had you not pointed it
    out!
     
    Devronious, Sep 14, 2004
    #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.