(entdel) fails on table entries?

Discussion in 'AutoCAD' started by John Avitt, Jan 26, 2005.

  1. John Avitt

    John Avitt Guest

    Why does the (entdel) function not work on table entries?
    For example,

    (entdel (tblobjname "STYLE" "UGLY_TEXT"))

    There are no references to the text style in the drawing.
    It will let me purge the text style, but I cannot use (entdel).

    Thank you.

    John
     
    John Avitt, Jan 26, 2005
    #1
  2. John Avitt

    Jürg Menzi Guest

    Hi John

    You can't, from help file:
    - Symbol table entries can be created through entmake with few restrictions,
    other than being valid record representations, and name conflicts can only
    occur in the VPORT table. *ACTIVE entries cannot be created.
    - Symbol table entries cannot be deleted with entdel.
    - The object states of symbol tables and symbol table entries may be accessed
    with entget by passing the entity name. The tblobjname function can be used
    to retrieve the entity name of a symbol table entry.
    - Symbol tables themselves cannot be created with entmake; however, symbol
    table entries can be created with entmake.
    - Handle groups (5, 105) cannot be changed in entmod, nor specified in entmake.
    - Symbol table entries that are not in the APPID table can have many of their
    fields modified with entmod. To be passed to entmod, a symbol table record
    list must include its entity name, which can be obtained from entget but not
    from the tblsearch and tblnext functions. The 70 group of symbol table
    entries is ignored in entmod and entmake operations.

    Use ActiveX instead:
    Code:
    (defun MeDelTextStyle (Sty / AcaDoc)
    (vl-load-com)
    (setq AcaDoc (vla-get-ActiveDocument (vlax-get-acad-object)))
    (not
    (vl-catch-all-error-p
    (vl-catch-all-apply
    (function
    (lambda ()
    (vla-delete (vla-Item (vla-get-TextStyles AcaDoc) Sty))
    )
    )
    )
    )
    )
    )
    
    Returns T if suceed, else nil...

    Cheers
     
    Jürg Menzi, Jan 27, 2005
    #2
  3. John Avitt

    John Avitt Guest

    Thank you.

    John
     
    John Avitt, Jan 27, 2005
    #3
  4. John Avitt

    Jürg Menzi Guest

    Welcome...¦-)

    Cheers
     
    Jürg Menzi, Jan 27, 2005
    #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.