Find command in VBA

Discussion in 'AutoCAD' started by Akos, Jul 17, 2003.

  1. Akos

    Akos Guest

    Hello everyone!

    I would like to implement the "find" command into our VBA program if it is
    somehow doable. I have no idea how to start it though. What I need is a
    search function that would find a specified text string, then an option to
    be able to zoom to that text string. Any help would be appreciated.

    thx,

    Akos
     
    Akos, Jul 17, 2003
    #1
  2. You can do it the long way with an input box(asking for text to look for),
    then create selection set of all text in drawing, then use the InStr to
    search the phrase. If found get insertion point the use zoom to center
    using insertion point.

    good luck
     
    William Salling, Jul 17, 2003
    #2
  3. If you're using AutoCAD 2000 through 2002, you can use
    the AcadX ActiveX Extension library to do this.

    Visit www.caddzone.com/acadx and download the AcadX
    distribution with samples. In the distribution, you
    will find a sample application called SuperFind that
    can search/replace text in many drawings in a folder
    without opening them in AutoCAD. That's probably more
    than what you need, but serves as a good example.

    To simply replicate the function of the FIND command,
    you can use the AcadXTextProcessor class.
     
    Tony Tanzillo, Jul 17, 2003
    #3
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.