Entmaking XDATA

Discussion in 'AutoCAD' started by David Bethel, May 5, 2004.

  1. David - What you're doing makes sense to an extent, and
    if you're not dependent on an applications that use
    inter-object referencing or hang data on extension
    dictionaries, then I suppose that there is no damage
    done using this approach.
     
    Tony Tanzillo, May 5, 2004
    #21
  2. David Bethel

    PG. Guest

    Hi David,

    If the purpose is to get rid of certain data and recreate the entity, try
    this.
    ;;============
    (defun tryme (ent / removelist) ; 'ent' is the entity list returned by
    (entget)
    (setq removelist '(-1 5 100 330)) ; dxf group codes to remove
    (foreach dxfitem
    removelist
    (while (assoc dxfitem ent)
    (setq ent (vl-remove (assoc dxfitem ent) ent))
    )
    )
    (entmake ent)
    )
    ;;============
    Just add the dxf group codes to removelist that you don't want to be in the
    new entity. But remember essential group codes must present.

    Hth,
    PG.
     
    PG., May 5, 2004
    #22
  3. David Bethel

    Rudy Tovar Guest

    Then I understood you correctly about the custom objects.

    Like making a copy of a ADT object, that perhaps has its own inner methods
    and custom commands for cloning an object, instead of using the regular
    copy, mirror, etc.
     
    Rudy Tovar, May 5, 2004
    #23
  4. David Bethel

    David Bethel Guest

    I've been burnt on that approach in the past. Trying to out guess what
    ADESK will add next is a no win situation. Whereas the basic required
    codes have been constant with a few exceptions over the years. The
    recent thread on exploding MINSERTS is 1 such example. I still think
    ADESK did the biggest screw up in years by not allowing them to be
    easily converted back to INSERTs or exploded is a shame. I get more
    calls about using them than anything else I do.

    I think that are a still a few group 100s that must be included in
    entmake calls. That should have been a consistent either you must or
    you don't have to. IMO.

    -David
     
    David Bethel, May 5, 2004
    #24
  5. Good point; don't want you to get burnt again.

    <snip>
     
    michael puckett, May 6, 2004
    #25
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.