bustr Posted April 8 Posted April 8 I call up an existing block of MTEXT. The style and font are both simplex. When I paste new text from a notepad file the editor changes the size and font. This is getting to be a big headache. Does anyone know how to fix this? Quote
mhupp Posted April 9 Posted April 9 I'm assuming its the new Notepad and not the one from 1995. it defaults to copy text with formatting. You have three options. You can change the default font and size in notepad settings, disable formatting also in settings ,or use Ctrl + Shift + V to paste as plain text. there also might be a right click paste as plain text option. 1 Quote
bustr Posted April 9 Author Posted April 9 Turning off formatting seems to have worked. Thanks. Quote
Steven P Posted April 17 Posted April 17 (edited) A snippet here, this appears to set clipboard text to plain text - removes formatting (fonts etc). (defun c:TXTCBNF ( / htmlfile result ) ; TXT: text, CB: Clip Board, NF: No Format ;; Set clipboard text to no format (setq result (vlax-invoke (vlax-get (vlax-get (setq htmlfile (vlax-create-object "htmlfile")) 'ParentWindow) 'ClipBoardData) 'getData "Text")) (vlax-release-object htmlfile) ;; Put no format text into clipboard (vlax-invoke (vlax-get (vlax-get (setq htmlfile (vlax-create-object "htmlfile")) 'ParentWindow) 'ClipBoardData) 'setData "Text" result) (vlax-release-object htmlfile) (princ) ) Always many ways to do the same thing! If you are OK to do LISPs else just ask (A part of a larger LISP of mine, so think this works... but it might not - my one puts in some thoughts between grabbing the clip board text and resetting it such as mm2 goes to 'squared', some company texts to upper case if not and so on) Edited April 17 by Steven P 1 1 Quote
bustr Posted April 17 Author Posted April 17 Thanks, I'll give it a try. 4 hours ago, Steven P said: A snippet here, this appears to set clipboard text to plain text - removes formatting (fonts etc). (defun c:TXTCBNF ( / htmlfile result ) ; TXT: text, CB: Clip Board, NF: No Format ;; Set clipboard text to no format (setq result (vlax-invoke (vlax-get (vlax-get (setq htmlfile (vlax-create-object "htmlfile")) 'ParentWindow) 'ClipBoardData) 'getData "Text")) (vlax-release-object htmlfile) ;; Put no format text into clipboard (vlax-invoke (vlax-get (vlax-get (setq htmlfile (vlax-create-object "htmlfile")) 'ParentWindow) 'ClipBoardData) 'setData "Text" result) (vlax-release-object htmlfile) (princ) ) Always many ways to do the same thing! If you are OK to do LISPs else just ask (A part of a larger LISP of mine, so think this works... but it might not - my one puts in some thoughts between grabbing the clip board text and resetting it such as mm2 goes to 'squared', some company texts to upper case if not and so on) 1 Quote
SLW210 Posted April 19 Posted April 19 You posted this in the AutoCAD LT Forum, are you using AutoCAD LT? Can you post the notepad .txt file and the .dwg? 1 Quote
bustr Posted April 20 Author Posted April 20 I am using AutoCad LT. I don't recall which drawing it was. If I come across it again I'll upload it. Thanks. Quote
SLW210 Posted April 21 Posted April 21 What year AutoCAD LT, I believe only LT 2024 and newer can use LISP? 1 Quote
Steven P Posted April 21 Posted April 21 That's my fault, I didn't read the topic header so offered a LISP... even at LT2024 I am not sure this would work - it isn't so great with 'VL' functions Quote
bustr Posted April 22 Author Posted April 22 On 4/21/2026 at 5:12 AM, SLW210 said: What year AutoCAD LT, I believe only LT 2024 and newer can use LISP? 2025 Quote
BIGAL Posted April 23 Posted April 23 (edited) @bustr Autodesk in there wisdom introduced lisp in LT2024 as so many other CAD programs have it, so competition was knocking. But and a big but they did not include everything as pointed out by @Steven P there is some documentation about what is missing, mainly in the VL commands. For me "get-application" is a real big one as stops you talking to Excel directly. I use Bricscad and as far as I can tell has a full implementation. May need to check their "Lite" version but have not heard of anything missing. Edited April 23 by BIGAL 1 Quote
Recommended Posts
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.