Jump to content

AutoCAD VBA FIND/search Routine?


muck

Recommended Posts

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,

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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:

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

  • 3 months later...
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.com.

Thank you very much joey!

 

:facepalm: SPAM ALERT!

 

I'd suggest that you NOT post your private email address in the future.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...