Paste plain text from clipboard to mtext without formatting

Paste plain text from clipboard to mtext without formatting

mruPRQUJ
Advocate Advocate
678 Views
7 Replies
Message 1 of 8

Paste plain text from clipboard to mtext without formatting

mruPRQUJ
Advocate
Advocate

Hi there,

 

Could you please help me to write a lisp to paste plain text from clipboard to mtext without formatting? Secondly, is it possible to add the lisp to toolbars? thank you very much in advance. 🙂

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

paullimapa
Mentor
Mentor

Where are you copying the text from?

Have you tried pasting into Notepad and then copying that into AutoCAD 


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

pendean
Community Legend
Community Legend

@mruPRQUJ wrote:

...a lisp to paste plain text from clipboard to mtext without formatting?...


Are you wanting to automate this right-click selection available only inside the MTEXT editor in an external LISP?

Or perhaps just don't know about this right-click menu inside MTEXT? It's a pretty cool feature.

 

pendean_0-1726769808420.png

 

You could also try this Windows tool https://www.stevemiller.net/puretext/ 

Message 4 of 8

mruPRQUJ
Advocate
Advocate

Hi there,

 

Copy text from word, or PDF into clipboard. And then paste them into AutoCAD Mtext. Both "copy to notepad" or "paste special" works. I just wonder if it is possible to create a lisp and add it into toolbar, it is faster. thanks. 🙂 

0 Likes
Message 5 of 8

Sea-Haven
Mentor
Mentor

Be careful "Copy text from word" the text can contain a lot of hidden characters not recognised as m/text, if copy lisp from word always paste to notepad 1st then copy again.

 

Just a side comment (vlax-get-or-create-object "Word.Application") so can talk direct to word. I have mtext to Word but not read, should be similar to Excel make a selection and read that. Sorry no code.

 

Re menu yes can add what ever you like to a menu. Look at Pendean image say 3 lines in menu.

Message 6 of 8

mruPRQUJ
Advocate
Advocate

Thank you very much for your support! 

0 Likes
Message 7 of 8

caddie99
Advocate
Advocate
Accepted solution

 

https://www.stevemiller.net/puretext/

 

this free program will paste text   stripped of formatting

Message 8 of 8

mruPRQUJ
Advocate
Advocate

It works perfect! Many thanks. 🙂

0 Likes