Page 1 of 1

Find and replace text

PostPosted: Mon Apr 17, 2017 10:39 am
by GuyS
I know there are work arounds for this but it would be extremely useful to have a function like MS Excel has. That is, "find and replace" text. With excel you can have the app search the whole page for and replace a text string with an updated/changed text string.

Re: Find and replace text

PostPosted: Mon Apr 17, 2017 12:13 pm
by Roger D
There is a macro, Scrive out there that has the function in it.

Or, you can do a change/text/content, search by area with mask/Entity/Text/Text Mask/Text Search then enter the text. You would have to do the replace for each find, but if you have the text copied via Ctrl-C, then you could paste with Ctrl-V. Fairly quick.

I think I got this command alias to work, put it in the dcadwin.dca file
[FR]
comment=Find-Replace text
alias=^;^F0^S8^S2^F5^S8^F0^F1^S7^S7^F1^S3^F1^F1^F1^ÂȘEnter Text to find^S0^S0^S0^F3

Re: Find and replace text

PostPosted: Mon Apr 17, 2017 5:01 pm
by joshhuggins
I use the subtext macro for this on plain text.

Re: Find and replace text

PostPosted: Mon Apr 17, 2017 5:35 pm
by GuyS
Thanks Josh "Subtext" works! Saves a lot of time.

Re: Find and replace text

PostPosted: Tue Apr 18, 2017 7:19 am
by Roger D
year that macro has sat quietly in the folder never used. Now I need to remember why it is there.

Re: Find and replace text

PostPosted: Tue Apr 18, 2017 9:25 am
by GuyS
Very handy indeed Roger! Especially when changing room labels for multi office buildings, or correcting/changing spec sheets!

Re: Find and replace text

PostPosted: Sat Apr 22, 2017 9:45 am
by jimgoodman
Do any of these methods work for PText?

Re: Find and replace text

PostPosted: Sat Apr 22, 2017 2:26 pm
by Roger D
neither Scrive or SubText will, just tested.
But Change/Text/Content Text Mask will find the word.

Re: Find and replace text

PostPosted: Sun May 14, 2017 3:27 am
by dhs
Not surprised that neither scrive nor subtext work on PText ... PText does not appear to have been exposed to DCAL. Not only is it not documented in the DCAL manual, but a macro does not even appear to be able to examine a PText entity (e.g. if a macro selects entities by area that includes a PText entity, then the PText entity is not even amongst the entities returned to the macro).
So as it stands there will not be a macro that can handle ptext this (not even my old dhText macro).

Re: Find and replace text

PostPosted: Wed Apr 21, 2021 3:34 pm
by Lars
what about ptext and mtext? has this been fixed yet?

Re: Find and replace text

PostPosted: Wed Apr 21, 2021 4:25 pm
by joshhuggins
Lars wrote:what about ptext and mtext? has this been fixed yet?

There is no FIND AND REPLACE function built in for P/MText yet. If your just using PText (Or MText that has all the same formatting) you can copy the text from the P/MText popup and paste it into something like Notepad and use it's Find and Replace function, and then copy and paste it back into the P/MText popup. If you have Mtext that has different formatting like different colors, Normal & Bold fonts, etc, you can Ctrl+Right click on the MText and choose Format RTF and copy the contents of the dialog that pops up and paste that into Notepad, do your Find and Replace for the text you want to swap, and then copy the updated text, and replace the text in the Format RTF dialog box and click OK and then Apply in the Properties dialog box.