yonderbob Posted September 27, 2012 Share Posted September 27, 2012 Hi all, I was wondering if it is possible to add for example the text "new" to all my existing text in my drawing while maintaining there old value? To calrify i want to achieve this: I have text 1: "abc" text2: "cba" ect. I want them all to become: "new abc" "new cba" ect. I know i can change all text to something new but then its all the same. + all texts are different. its alot of work to do manually wonder if i can be "lazy" Quote Link to comment Share on other sites More sharing options...
ReMark Posted September 27, 2012 Share Posted September 27, 2012 I think it could be done with a custom lisp routine but be careful what you wish for. Could there possibly be some text entities, however few, where you would not want the additional text to appear? Example: in your title block. Quote Link to comment Share on other sites More sharing options...
yonderbob Posted September 27, 2012 Author Share Posted September 27, 2012 Hi remark, thanks for your awnser. Hmm it would not matter so much if i add those blocks later i would just have to change my workorder. but let's say this then. Can i add the"new" text to all the text i selected? with different entities each? Quote Link to comment Share on other sites More sharing options...
ReMark Posted September 27, 2012 Share Posted September 27, 2012 Blocks? Is the text part of a block? Is it an attribute? David Bethel, a forum member, had a lsip routine that would add a prefix or a suffix to a string of text called AddFix.Lsp (date: Mar 14, 2000). Not sure if it is still around here. I'd have to look. Or you could. Never mind. I'm feeling generous this morning. Here is a link to the thread the lisp routine was contained in. Read through the whole thread as you'll find some additional information that might be of further interest. http://www.cadtutor.net/forum/showthread.php?1608-Lisp-to-add-a-prefix-or-suffix-to-selected-text&highlight=addfix.lsp Quote Link to comment Share on other sites More sharing options...
yonderbob Posted September 27, 2012 Author Share Posted September 27, 2012 Thanks alot remark, That lisp routine works almost perfect . My vlisp knowledge is kinda basic, is there a way to add a space to the entered string you have to enter in the running lisp routine? What it does now is it ask me for the prefix: i enter the prefex "New "(note space) and it gives me the result "NewABC", "NewCBA,ect" instead of "New ABC" , "New CBA" Quote Link to comment Share on other sites More sharing options...
yonderbob Posted September 28, 2012 Author Share Posted September 28, 2012 I've found out about (vl-string-trim-left "") but that doens't seem to do the trick. I read that when you force the trim to the left it doesn't happen automatically at the end. Am i missing someting, using the wrong code? or do i have it in the wrong location in the code? Quote Link to comment Share on other sites More sharing options...
ReMark Posted September 28, 2012 Share Posted September 28, 2012 You're asking the wrong person. Think of me as the tour guide. Now you need a performer (a lisp guru). Don't worry, we have a few here at CADTutor and one of them should no doubt come upon this thread and answer your question. Be patient. Thanks. 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.