Skip to main content
Participant
June 3, 2015
Question

FM12. How to rename Condition tags?

  • June 3, 2015
  • 1 reply
  • 385 views

I created a condition tag called FISH, and applied it in many places in many files. Now I wish it had been named DOG.

Is there an easy way to change FISH to DOG in all files?

I thought of doing this:

  1. create a new condition called DOG in one of the files,
  2. import conditional text tags from that file into the many other files,
  3. apply DOG to some text, then copy an instance of a DOG condition by Edit>CopySpecial>ConditionalTextSettings.
  4. Search the entire book for instances of ConditionalText = FISH, and Change By Pasting.

Would that work?

If it would work, FISH would remain, and I'd have to delete it from every file. Is this still the best way of doing it?

Thanks, people.

    This topic has been closed for replies.

    1 reply

    Bob_Niland
    Community Expert
    Community Expert
    June 3, 2015

    It it's practical to hack the MIFs, it appears that all you need to do is change all:

    <CTag `FISH'>

    to

    <CTag `DOG'>

    and all

    <InCondition `FISH'>

    to

    <InCondition `DOG'>

    Now, that's for FM7. Syntax for conditional expressions in later versions might complicate things.

    carbenoAuthor
    Participant
    June 3, 2015

    Thanks for the idea, but a test on an FM12 .mif shows that it doesn't work. If I could have made it work, it seems tedious or dangerous.

    Bob_Niland
    Community Expert
    Community Expert
    June 3, 2015

    re: ... but a test on an FM12 .mif shows that it doesn't work.

    Is that because the FM12 syntax has changed, or because the find/replace failed?

    The characters <`'> might need escaping depending on the editor used.

    re: ... it seems tedious or dangerous.

    It's only tedious if there's an easier method .
    It's only dangerous if you ignore the console log and don't retain backups .

    I've scripted far more complex and dangerous stuff.