Author Topic: Find and Replace text files  (Read 1533 times)

0 Members and 1 Guest are viewing this topic.

MSTG007

  • Gator
  • Posts: 2598
  • I can't remeber what I already asked! I need help!
Find and Replace text files
« on: March 13, 2019, 07:49:07 AM »
I am putting together a drawing of a county with shapefiles within Autodesk MAP. I decided to do one county before I did the rest of the counties within the State. Then use this as a master to save out.

Inside the Task Pane, I have several shapfiles that are formatted visually; the way I would like to see them. I can save out these out as (.layers) files of each one.

I am wondering if its possible to take the saved (.layers) files and perform a find and replace on the file names and the contents within the (.layers) file that can be read with a text editor?

For instance, Marion_Co_Lakes_SPE, I would like to find and replace the "Marion" part with "Madison". Then perform the same step on the other (.layers) files.

Civil3D 2020

CincyJeff

  • Newt
  • Posts: 89
Re: Find and Replace text files
« Reply #1 on: March 13, 2019, 11:46:28 AM »
Since it is a standard text file in Notepad you should be able to find and replace. I used to do it with AutoCAD profile files.

MSTG007

  • Gator
  • Posts: 2598
  • I can't remeber what I already asked! I need help!
Re: Find and Replace text files
« Reply #2 on: March 13, 2019, 11:50:09 AM »
Yup. That is what I am doing right now. I have a lot of counties to go. If I change one of the layer format. I would need to do it for the rest of the counties lol.
Civil3D 2020

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: Find and Replace text files
« Reply #3 on: March 13, 2019, 09:51:27 PM »
That's not just text, that's XML.  While you could try a standard search and replace, you might get better results manipulating it as XML.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}