View Full Version : AutoCAD VBA FIND/search Routine?
muck
4th Apr 2011, 04:10 pm
AutoCAD 2010
Does anyone have an AutoCAD VBA Find/search routine that would zoom in on stings in a drawing including
blocks etc? Simular to the AutoCAD find command. I would like have a routine that I could put in
a VBA batch loop to search many drawings at once. I have many drawings that I am looking through and I think
that would help me.
Thank you,
BlackBox
4th Apr 2011, 06:03 pm
I do not know of any VBA routines that accomplish this, but an excellent LISP routine is Lee Mac's Batch Find & Replace Text (http://lee-mac.com/bfind.html).
muck
6th Apr 2011, 12:20 pm
I am looking for a Search Tool in VBA. Not a replace routine.
Something that zooms in on text to see if certain string is in a
drawing.
BIGAL
11th Apr 2011, 04:03 am
Like Renderman you have to search first before you can replace!
This is search for blocks just change for serach for text, mtext etc
Dim SS As AcadSelectionSet
Dim Count As Integer
Dim FilterDXFCode(1) As Integer
Dim FilterDXFVal(1) As Variant
Dim attribs As Variant
Dim BLOCK_NAME As String
On Error Resume Next
FilterDXFCode(0) = 0
FilterDXFVal(0) = "INSERT"
FilterDXFCode(1) = 2
FilterDXFVal(1) = "Myblockname"
Set SS = ThisDrawing.SelectionSets.Add("issued")
SS.Select acSelectionSetAll, , , FilterDXFCode, FilterDXFVal
For Cntr = 0 To SS.Count - 1
do what ever here and find string
BlackBox
11th Apr 2011, 04:23 pm
Like Renderman you have to search first before you can replace!
What an excellent 'reminder' of the differences between specified, and implied tasks. :wink:
Thanks for the code snippet, Bigal. Cheers! :beer:
RickyD302
21st Apr 2011, 02:32 pm
The Find and Replaced by Lee Macs does just a search.
muck
27th Apr 2011, 12:37 pm
Is Bigal's Code complete?
Thank you
BlackBox
27th Apr 2011, 12:46 pm
Is Bigal's Code complete?
You tell us... what happens when you test it in VBAIDE?
joeybuttta
4th May 2011, 08:16 pm
I don't have the actual code, but I do use "Superfind" which is a very powerful VBA find and replace. Doesn't need to open drawings, pretty quick replace tool. If you can't find it searching online, let me know and I'll send it to you.
francisquintos
23rd Aug 2011, 08:00 am
joey! good day to you! i need also the superfind tool and it'll be appreciated more if you'll send it to me too. My email add is francisquintos@yahoo.com.
Thank you very much joey!
BlackBox
23rd Aug 2011, 12:44 pm
joey! good day to you! i need also the superfind tool and it'll be appreciated more if you'll send it to me too. My email add is <SNIP>@snip.com (http://www.cadtutor.net/forum/%3Csnip%3E@snip.com).
Thank you very much joey!
:facepalm: SPAM ALERT!
I'd suggest that you NOT post your private email address in the future.
francisquintos
25th Aug 2011, 07:17 pm
thanks renderman for the reminder.
Powered by vBulletin™ Version 4.1.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.