suryacad Posted January 8, 2015 Share Posted January 8, 2015 Exploding multiple WORDS After Explode the WORD should split into W = individual character O = individual character and so on. Thanks. Quote Link to comment Share on other sites More sharing options...
suryacad Posted January 8, 2015 Author Share Posted January 8, 2015 Thanks for the lead http://www.eng-tips.com/viewthread.cfm?qid=95572 But the lisp returns error in Autocad 2012 - Start command with XTEXT.; error: malformed list on input I needed it to do some number and word sorting in a messed up drawing. Quote Link to comment Share on other sites More sharing options...
Tharwat Posted January 8, 2015 Share Posted January 8, 2015 But the lisp returns error in Autocad 2012 - Start command with XTEXT.; error: malformed list on input I needed it to do some number and word sorting in a messed up drawing. That means the routine is in need of a close bracket and in that program it needs to be at the end of the program . Quote Link to comment Share on other sites More sharing options...
suryacad Posted January 9, 2015 Author Share Posted January 9, 2015 That means the routine is in need of a close bracket and in that program it needs to be at the end of the program Thanks Tharwat. ; TIP #637 XTEXT.LSP By Ashoke Bhattacharya CADalyst Magazine March 1991 ; ------------------------------------------------------------------------ ; DESCRIPTION: Explodes a line of text into its component letters. ; ------------------------------------------------------------------------ (princ "\nStart command with XTEXT.")(graphscr)(princ) ; ------------------------------------------------------------------------ (defun C:XTEXT () (setvar "CMDECHO" 0) (setq A1 (entget (car (entsel "\nSelect text: ")))) (setq A2 (cdr (assoc -1 A1))) (command "ERASE" A2 "") (setq A (cdr (assoc 1 A1))) (setq SP (cdr (assoc 10 A1))) (setq HT (cdr (assoc 40 A1))) (setq B (strlen A)) (setq B1 1) (repeat B (setq C (substr A B1 1)) (command "TEXT" SP HT 0 C) (setq B1 (+ B1 1)) (setq HT1 HT) (if (= 108 (ascii C)) (setq HT1 (/ HT 2))) (if (= 105 (ascii C)) (setq HT1 (/ HT 3))) (if (= 73 (ascii C)) (setq HT1 (/ HT 1.5))) (setq SP (polar SP 0 HT1)) ) (redraw) (princ) ) now the error stopped but it explodes any WORD into OOOO O's and the position of text is also changed. any work around so that it just explodes the word into its individual character and remains in the same place. Thanks Quote Link to comment Share on other sites More sharing options...
pBe Posted January 9, 2015 Share Posted January 9, 2015 ....now the error stopped but it explodes any WORD into OOOO O's and ..... How's that again? O's ? Let us have a look at that drawing file of yours so we can see why its doing that. Quote Link to comment Share on other sites More sharing options...
ReMark Posted January 9, 2015 Share Posted January 9, 2015 It works on my system running AutoCAD 2015 using the STANDARD text style (font = Arial). Quote Link to comment Share on other sites More sharing options...
BIGAL Posted January 9, 2015 Share Posted January 9, 2015 Here is a another one to try works well https://apps.exchange.autodesk.com/ACD/en/Detail/Index?id=appstore.exchange.autodesk.com%3AText-to-Geometry%3Aen Quote Link to comment Share on other sites More sharing options...
pBe Posted January 10, 2015 Share Posted January 10, 2015 That is cool BIGAL, still can't figure out how the OP ended up with with a bunch of O's. Quote Link to comment Share on other sites More sharing options...
ReMark Posted January 10, 2015 Share Posted January 10, 2015 The word he tested the lisp routine on was "Cherrios".:lol: Quote Link to comment Share on other sites More sharing options...
BIGAL Posted January 10, 2015 Share Posted January 10, 2015 I posted a explode text down to elements T2G but the OP just wants individual characters. remains in the same place The problem with text is that it is kerned look at AW the top of the W is really close to the bottom of the A. If you use the text style Mono.shx it has fixed spacing each character is same width, To explode WORDAL is probably not bad some combo's will increase in width. You could write your own kerning and adjust the spacing of next character. Quote Link to comment Share on other sites More sharing options...
pBe Posted January 12, 2015 Share Posted January 12, 2015 The word he tested the lisp routine on was "Cherrios".:lol: : That explains a lot Quote Link to comment Share on other sites More sharing options...
suryacad Posted January 13, 2015 Author Share Posted January 13, 2015 Sorry for the late reply. Actually i tried the lisp on another file works totally fine. but the text is still moved from original position - using Autocad 2013 Attached drawing for churning out unlimited supply of Cherrios new block.dwg Quote Link to comment Share on other sites More sharing options...
ReMark Posted January 13, 2015 Share Posted January 13, 2015 You got what you basically asked for. No one can account for the many subtleties of every font out there in a lisp routine. Bottom line...change your font until you find one where the individual characters are not shifted or where the shift is ever so slight. Quote Link to comment Share on other sites More sharing options...
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.