Jump to content

Possible to add text infront of all text while maintaining there old text?


yonderbob

Recommended Posts

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" :D

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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"

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...