Using wildcards

Using wildcards

114729SNYMQ
Observer Observer
662 Views
7 Replies
Message 1 of 8

Using wildcards

114729SNYMQ
Observer
Observer

Hello everyone.....

I received a DWG with several Mtexts like:   

 

[Z= -0.252]        

+0.002

 

So a Mtext with 2 rows

But all with different numbers, see attachment

 

I want to find and replace all of them to a text that just contains the first number, so in this case

-0.252

 

How do i use the wildcards in find and replace?

0 Likes
Accepted solutions (1)
663 Views
7 Replies
Replies (7)
Message 2 of 8

paullimapa
Mentor
Mentor

sounds like something that will require lisp

you may want to post this in that forum and also include a sample dwg:

https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bd-p/130


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 3 of 8

Pointdump
Consultant
Consultant

Hi Vincent,
An interesting problem. Can you post your drawing?
Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2025
0 Likes
Message 4 of 8

ВeekeeCZ
Consultant
Consultant

Isolate them, move them to new drawing.

Explode them.

Find and remove all *.###

Then replace "[Z= " and "]" with nothing.

Easy.

0 Likes
Message 5 of 8

Pointdump
Consultant
Consultant

Hi @ВeekeeCZ,
"Easy."
Uh huh. What about the lower line of the MText? And how to return the filtered text back to being a Leader?
Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2025
0 Likes
Message 6 of 8

Valentin_CAD
Mentor
Mentor

@114729SNYMQ ,

 

Certainly, an interesting topic. As mentioned, this may be a task for the Visual LISP, AutoLISP, General Customization Forum Autodesk.

 

It's a challenge because the [ is considered a wildcard and "Find and Replace" will not work.

 

ValentinWSP_2-1730455397645.png

 

 

ValentinWSP_1-1730455268146.png

 

 



Select the "Mark as Solution" if my post solves your issue or answers your question.

Seleccione "Marcar como solución" si mi publicación resuelve o responde a su pregunta.


Emilio Valentin

Message 7 of 8

ВeekeeCZ
Consultant
Consultant

@Valentin_CAD wrote:

@114729SNYMQ ,

...

It's a challenge because the [ is considered a wildcard and "Find and Replace" will not work.

 

 

ValentinWSP_1-1730455268146.png

 

 


 

You need to use a reverse quote sign per the last line of your screenshot

 

`[

Message 8 of 8

Valentin_CAD
Mentor
Mentor
Accepted solution

@114729SNYMQ ,

 

Good point @ВeekeeCZ !

 

So, here is a tedious option, but it resolves: 

 

Your example:

ValentinWSP_5-1730467317213.png

 

Use ?0.0## to remove the second line:

 

ValentinWSP_2-1730466739769.png

 

Then, use `] to remove the end bracket:

 

ValentinWSP_3-1730467117539.png

 

Lastly, use `[X= to remove the front portion:

 

ValentinWSP_4-1730467188022.png

 



Select the "Mark as Solution" if my post solves your issue or answers your question.

Seleccione "Marcar como solución" si mi publicación resuelve o responde a su pregunta.


Emilio Valentin