Batch Find and Multiple Replace

Batch Find and Multiple Replace

Anonymous
Not applicable
4,783 Views
16 Replies
Message 1 of 17

Batch Find and Multiple Replace

Anonymous
Not applicable

I'm needing help locating a program that can find an input on multiple lists but that input can be replaced by different outputs per list. 

 

Ex: I have a text input BK|P on 50 lists, I want to change that to different variants of BK(|K,|J,|H.... etc) but without having to find and replace for each list. I want to have that input for each list all up at the same time so just a simple type and click can have them all changed and saving me hours of editing. Please help.

0 Likes
Accepted solutions (1)
4,784 Views
16 Replies
Replies (16)
Message 2 of 17

JTBWorld
Advisor
Advisor

We might have something for you like JTB Batch Change or can create a custom solution. 


Jimmy Bergmark
JTB World - Software development and consulting for CAD and license usage reports
https://jtbworld.com

Message 3 of 17

Anonymous
Not applicable

Going to check it out in a few minutes! Thank you for the quick reply.

0 Likes
Message 4 of 17

timothy_crouse
Collaborator
Collaborator

Find Dialog >>  Is there a reason the "REPLACE ALL" function will not work?

This does not require any interaction other than entering the initial string sets(s).

 

-Tim C.

0 Likes
Message 5 of 17

Kent1Cooper
Consultant
Consultant

Questions arise....

 

In what form do you have the 50 lists?  Are they each stored under their own variable name?  Or a single list of 50 sub-lists?  Something else?

 

Does position in the list matter?  It should be pretty simple to remove a "BK|P" item from any list that contains one, and tack a "BK|J" [etc.] item onto the front of the list.  If the replacement needs to be in the same place, it's more complex but certainly possible.

 

Should the variants be generated by something like simply stepping through the alphabet, or do you have specific variants in mind?

 

Does it matter what final-letter variant goes into the entry in any given list?  Or should whatever variant comes next be given to whatever list comes next?

 

50 is more than the available letters for after the | character.  Should there be repeats after the alphabet is exhausted?  Double letters? Numbers?  Letter-number combinations like "BK|A1"?  Punctuation characters?

 

Should "BK|P" be skipped over if stepping through the alphabet, or is it acceptable for one list [or more than one if repeats are allowed] to contain that in the end?

 

Etc., etc.

Kent Cooper, AIA
0 Likes
Message 6 of 17

Kent1Cooper
Consultant
Consultant

@Kent1Cooper wrote:

Questions arise....


... and I guess the big one that didn't even occur to me before:  What are  these lists?  I assumed an AutoLisp-type list of text string items, such as ("BK|P" "Manny" "Moe" "Jack"), but someone suggested using FIND, which would not be appropriate unless you're talking about Text or Mtext or Attributes or some such thing.  Is a list an Mtext object perhaps with a new line for each "item" in it, and "BK|P" on one of the lines?  If it's something like a stack of separate Text objects, from AutoCAD's perspective they are independent, and their constituting a "list" would only be by positional relationship.  Are they Tables, perhaps?

Kent Cooper, AIA
0 Likes
Message 7 of 17

devitg
Advisor
Advisor

@Anonymous all @Kent1Cooper  questions and guessing , can be solved with  samples , DWG and or LSP.  

 

 

Message 8 of 17

Anonymous
Not applicable

I am going to try to answer your questions as best as I can (Still a little bit of a novice when it comes to AutoCAD):

 

1.)These are DWG files

 

2.) Yes, position does matter

 

3.) Specific variables in mind

 

4.) Given to whatever list comes next

 

5.) Yes some will double letters and may add numbers (its all based on the part number it is being replaced with)

 

6.) It will be acceptable if there are repeats. 

 

Thank you for the response and I hope to hear back from you soon.

0 Likes
Message 9 of 17

devitg
Advisor
Advisor

@Anonymous , a sample DWg , will clear all doubt. Do not be afraid, an upload do not transmit COVID19

 

Message 10 of 17

Anonymous
Not applicable

These are the kind of drawings that I am working with.

0 Likes
Message 11 of 17

Kent1Cooper
Consultant
Consultant

@Anonymous wrote:

These are the kind of drawings that I am working with.


And what in that drawing contains or constitutes your 50 or so lists, whatever they are?  FIND finds 55 instances of "BK|", but none of "BK|P".

Kent Cooper, AIA
0 Likes
Message 12 of 17

Anonymous
Not applicable

That was just an example in the 50 or so list I will be changing the section where BK|J is.

0 Likes
Message 13 of 17

Kent1Cooper
Consultant
Consultant

@Anonymous wrote:

That was just an example in the 50 or so list I will be changing the section where BK|J is.


I'm still confused by your use of the word "list," which has a specific meaning in AutoLisp terminology, but nothing in your drawing seems like it could be related to that.  All instances the FIND command finds of "BK|J" are in Block Attributes, and there are only four of them.  Can you describe in more detail, using AutoCAD's words for things, exactly what you want to change?

Kent Cooper, AIA
0 Likes
Message 14 of 17

Sea-Haven
Mentor
Mentor

Lee-mac.com has a batch find and replace may be useful. Maratovich has one also just google name + Autocad.

Message 15 of 17

Anonymous
Not applicable

I posted a sample up above.

0 Likes
Message 16 of 17

Anonymous
Not applicable

I use the BFind from Lee mac and it is almost what I am looking for, but it does not allow multiple outputs (Just a single input on multiple drawings to be changed to the same output).

0 Likes
Message 17 of 17

Sea-Haven
Mentor
Mentor
Accepted solution

As lee's code is provided as source can normally make it repeat and skip say screen entry you may want to contact Lee direct.