Find and erase all text beginning with a certain caracter ?

Discussion in 'AutoCAD' started by John Smith, Sep 17, 2004.

  1. John Smith

    John Smith Guest

    How can I find af erase all text in a drawing beginning with a certain
    caracter ?

    Dim ssTest As AcadSelectionSet
    Dim gpCode() As Integer
    Dim gpData As Variant

    With ThisDrawing.Utility
    Set ssTest = ThisDrawing.SelectionSets.Add("ssAllBut")

    ReDim gpCode(2): ReDim gpData(2)
    gpCode(0) = 0: gpData(0) = "~line"
    gpCode(1) = 0: gpData(1) = "~circle"
    gpCode(2) = 0: gpData(2) = "~text" ' erase no text !!!, but I want
    text starting with a < ' > !!

    ssTest.Select acSelectionSetAll, , , gpCode, gpData
    End With


    ssTest.Erase
    ssTest.Delete
     
    John Smith, Sep 17, 2004
    #1
  2. John Smith

    Joe Sutphin Guest

    I believe [w/o testing] you will need to create a selection set of Text and
    MText. Then iterate through that selection set using something like

    If Mid(<"SelectionSetItemString">, 1, 1) = "'" Then

    Joe
     
    Joe Sutphin, Sep 17, 2004
    #2
  3.  
    Paul Richardson, Sep 18, 2004
    #3
  4. If you goal if to just do that; than you can use Qselect command with the
    wildcard option...
     
    Paul Richardson, Sep 18, 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.