Code Red > AutoLISP (Vanilla / Visual)

Manipulate existing text

(1/2) > >>

mhcadman:
PLEASE HELP!!!!
I've tried searching the web and using ACAD help but i can't make this lsp happen.

I need a lsp program that will change existing text.......

Existing test is:   PLAN EL.180'-0"

I want to select existing text then right-click to accept.

After the right-click, i want the selected text to be "UNDERLINED (adding %%u to the beginning- %%uEL.180'-0" )", the "STYLE" to change to "STD35E", the
"HEIGHT" to change to 3", the "LAYER" to change to "CY1".

An additional "help" would to have the lsp read a "data file" to import the "STYLE, HEIGHT, and LAYER". (Underlining will always be required.)
Different "data files" for multiple requirements.

(bribes will be considered  :-) )

Sincerely,
Mike

kdub_nz:

How many do you need to change ?

just to put things in perspective, it will take about 6 seconds to change those with the Properties dialog/palette.


and about 10 seconds to remember the name and load the special program to do it automagically.

CAB:
Welcome to the Swamp Mike.

Creating STYLES & Layer's is easy in lisp via the command.
Also there are several subroutines found in these threads to do just that.

If you are selecting the text why do you need a Right Click to confirm?
Why would you select the text if you are not wanting to change it?

Do you know some lisp programing?

Do you want to select each text to change one at a time?

We can get you going but we need a little more information.

daron:
One question that comes to mind right off the bat is: is this plain text or is there the possibility of Mtext? It does make a difference.

mhcadman:
Thank you for your replies!

The lsp will be placed in a toolbar button so the 10 seconds argument is out.

I was using the "6 second change text via propties box" which gets old after about a hundred times and clicking the "text contents box" getting to the beginning of the text and entering %%u, more clicking finding the correct "style", more clicking and entering the "height" and more clicking to enter the "layer".

Mostly it's PLAIN text, seldom MTEXT.

I would not purposely select text i did not want to change.

Isolating the text layer then selecting them all at once then changing them with this new lsp would be great!

It doesn't have to have a right click to accept, in fact, if i pick the text and the lsp changes it instantly without any further intervention on my part, perfect.

I am still learning acad lsp, obviously.
Give me Microstation UCM or BAS any time.

Navigation

[0] Message Index

[#] Next page

Go to full version