vlr-copied reactor not finding the copied object

Discussion in 'AutoCAD' started by Allen Johnson, Jul 16, 2004.

  1. I'm using the code below in response to the :)vlr-copied . leader_txt_copied) reactor event:

    (defun leader_txt_copied (nobj robj plist / ent grpmbrs tname)
    (if (= (print (type (car plist))) 'ENAME)
    (progn
    (setq CENT (print (car plist)))
    (print (entget cent))
    )
    )
    )

    But it can't get the entity data for the new object created (plist):

    Command: c COPY
    Select objects: 2 found, 1 group <------------------- Notice that it's part of a group.

    Select objects: Specify base point or displacement: Specify second point of
    displacement or <use first point as displacement>:
    INT
    INT
    ENAME
    <Entity name: 7ea18440>
    nil <-------------------------- Note that (entget cent) returns nil here!
    ENAME
    <Entity name: 7ea18448>
    nil <-------------------------- and here.
    Specify second point of displacement:

    Any ideas on how I can get the entity data? What I'm really after is the newly created group name
    of this copy.
    I do have the code to obtain the groupname from the entitydata, but (entget cent) returns nil.
     
    Allen Johnson, Jul 16, 2004
    #1
  2. Allen Johnson

    Jürg Menzi Guest

    Hi Allen

    That's because the copied entity has an non readable status during the copy
    event. You've to write the (ToDoFunction) in a chache and call the chache in
    :VLR-commandEnded.

    Cheers
     
    Jürg Menzi, Jul 18, 2004
    #2
  3. I thought it might entail something like that!
    More work, eh?
    Thanks.
     
    Allen Johnson, Jul 19, 2004
    #3
  4. Allen Johnson

    Jürg Menzi Guest

    Hi Allen

    Welcome...¦-)
    Yep

    Cheers
     
    Jürg Menzi, Jul 19, 2004
    #4
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.