Undesired Text Style Removal now Non-Purgeable

Goal:
Find methods to help assemble a new LISP program or find an existing LISP program to perform the following:
Purge an undesired text style that is referenced by an object property or other data not visible and proving impossible to purge.

Please provide:
Links to and/or actual LISP programs that perform this or similar object PURGES.
LISP tips and/or instruction on links to methods to create a HARD PURGE (object style in use) LISP program.

Many thanks for reviewing this inquiry!

Clint

Comments

  • Objects using that text style can be so deep to find maybe in a Block somewhere. I would start there. If The dwg has come from CIV3D it holds lots of proxy info there is a deletestyleandsettings in CIV3D need to run that first to purge stuff out.
  • Something that usually might be useful, although it doesn't use lisp, could be to use the Drawing Explorer.
    With this, the text style to be deleted could be right-clicked and the option Delete could be chosen.
    Further, there will be the option to either delete the entities using that text style or to keep those entities and replace their text style with another one.
  • Not lisp, more on the advanced side, but you may be able to use filer to search for what’s referencing a particular style

    Concept using Python in V24

    import traceback
    from pyrx_imp import Rx
    from pyrx_imp import Ge
    from pyrx_imp import Gi
    from pyrx_imp import Db
    from pyrx_imp import Ap
    from pyrx_imp import Ed
    from pyrx_imp import Gs
    from pyrx_imp import Cv

    def PyRxCmd_doit() -> None:
    try:
    db = Db.curDb()
    style = db.textstyle() # cur style
    ids = db.objectIds() # all ids

    found = {}

    for id in ids:
    #this is it!
    if id.isDerivedFrom(Db.TextStyleTableRecord.desc()):
    continue
    dbo = Db.DbObject(id) # kforread
    snooper = Db.SnoopDwgFiler(Db.FilerType.kCopyFiler)
    dbo.snoop(snooper)

    for item in snooper.buffer():
    if item[1] == style:
    name = dbo.isA().name()
    hwnd = id.handle()
    if name in found:
    found[name].append(hwnd)
    else:
    found[name] = [hwnd]

    for item in found.items():
    print(item[0], len(item[1]))

    except Exception as err:
    traceback.print_exception(err)
    found

    : DOIT
    AcDbMText 6220
    AcDbDimStyleTableRecord 25
    AcDbDetailViewStyle 4
    AcDbSectionViewStyle 4
    AcDbMLeaderStyle 1
    AcDbAttribute 3389
    AcDbText 1174
    AcDbAttributeDefinition 266
    AcDbTable 2
    AcDbTableStyle 6
    AcDbTextStyleTable 1
  • I appreciate your interest and all the great, useful ideas and code. In this case, a separate inquiry yielded a LISP solution directed specifically and solved the issue with this troublesome font.
  • Virgil said:

    Something that usually might be useful, although it doesn't use lisp, could be to use the Drawing Explorer.
    With this, the text style to be deleted could be right-clicked and the option Delete could be chosen.
    Further, there will be the option to either delete the entities using that text style or to keep those entities and replace their text style with another one.

    Hi Virgil,

    Unfortunately, this option did not work.

    Thanks,

    Clint