PQ Systems Knowledge Base

CR: "Search and Replace" Utility to Perform a Mass Edit of CHARTrunner Chart Definitions

If you need to make the same change to a large number of charts, editing each chart individually can be time consuming. Luckily CHARTrunner charts (.crf files) are basically texts files containing all the information that CHARTrunner needs to create your chart. This allows you to use popular search and replace utilities to make these mass edits.

TextCrawler is my program of choice for this purpose. It can be downloaded here:

http://www.digitalvolcano.co.uk/content/textcrawler

After you start TextCrawler, change the “Start Location” on the top right to the folder containing your chart files. Under “Filename/Filter” delete what is already there and put *.crf

This makes TextCrawler search in the specified folder for files with a .crf extension. Next to “Find” enter chartrunner and click on the find button. The bottom of the form will display every instance of chartrunner found in the .crf files in this folder. This is great for checking what you want to replace before committing the final changes. You will see something like this.

If everything is unchecked, and you click the “Replace” button, then every instance shown at the bottom will be replaced.

Now, go to your folder containing chart files and right click on a .crf file, select “Open with” and either choose Notepad from the list or select “Choose program” and select Notepad.

Look for something you want to change. CHARTrunner automatically places the PQ Systems logo and CHARTrunner logo on every chart unless you have changed those settings; this makes a good example. Look at that section of the .crf file. It will look something like this:

<Titles PQ="Section">
<Left/>
<LeftTitleFont/>
<Right/>
<RightTitleFont/>
<TitleGrid>0</TitleGrid>

< Title PQ="Section" Number="1" Align="1">
<Top>@image(pqlogo.wmf)</Top>
<TopFont/>
</Title>

< Title PQ="Section" Number="1" Align="2"> <Top>@CTN</Top>
<TopFont/>
<Bottom>Units per month</Bottom>
<BottomFont/>
</Title>
< Title PQ="Section" Number="2" Align="2"> <Top>@FILTER</Top>
<TopFont/>
</Title>

< Title PQ="Section" Number="2" Align="3">
<Bottom>@image(crlogo.wmf)</Bottom> <BottomFont/>
</Title>
</Titles>

Let’s say we want to change all pqlogo.wmf references to your company logo name which might be companylogo.jpg. Put pqlogo.wmf in the “Find” field and companylogo.jpg in the “Replace” field and click on the Find button. Make sure everything on the bottom is what you want to replace then click the “Replace” button. The logo on each of your charts has now been updated!

I recommend using the TextCrawler options to have it make backups of your files just in case something goes wrong in the process.

Would you like to...

Print this page Print this page

Email this page Email this page

Post a comment Post a comment

Subscribe me

Add to favorites Add to favorites

Remove Highlighting Remove Highlighting

Edit this Article

Quick Edit

Export to PDF

User Opinions (0 votes)

No users have voted.

How would you rate this answer?



Thank you for rating this answer.

Related Articles

No related articles were found.

Attachments

No attachments were found.

Continue