Search and Replace Q

Search and Replace Q

Phil
Advocate Advocate
335 Views
2 Replies
Message 1 of 3

Search and Replace Q

Phil
Advocate
Advocate

Hi all

 

Is it possible to check two text clusters in a string and then carry out a replace action?

 

I have a pipe-line label of the form 50-ST-46875-EC1-3A and I would like to find all of the strings containing ST in the second cluster and EC1 in the fourth cluster.

If I can isolate those, then the idea is to replace EC1 with EC4 for in all of the returned strings.

 

Is it possible to achieve this with the standard Search and Replace command in AutoCAD, or does it need some lisp magic?

We are currently running the 2018 version of ACAD if that makes a difference.

 

Thanks

 

Phil

0 Likes
336 Views
2 Replies
Replies (2)
Message 2 of 3

imadHabash
Mentor
Mentor

Hi,

Try QSELECT and FIND commands . 

Imad Habash

EESignature

0 Likes
Message 3 of 3

BrianBenton
Collaborator
Collaborator

I think you might be able to, but it could be a bit tricky. Using the FIND command, search for your first text string. If you can isolate those objects in some way, then select only them. Start the FIND command again and search for your second criteria. In the FIND command window, on the "FIND WHERE" box, select the option for "Selected Objects". This will execute the FIND command only from within the selected objects. This might work.

Brian C. Benton

bbenton@cad-a-blog.com
http://CAD-a-Blog.com
twitter.com/bcbenton
www.facebook.com/CADaBlog


0 Likes