Variables and Code Replacements

Code replacements in Photo Mechanic

Last Updated -

Photo Mechanic’s code replacement speeds up captioning of often-used terms or names like those used in sports photography but can be used to make a shorthand for caption replacements in any type of photography.
To use code replacement, create a plain (UTF-8) text file with two or more tab-separated columns. The first column is the “code” and the second (or more) are the replacements.
Here’s a sample code replacement for a fictional game featuring the Chattanooga Choo-Choos and the Detroit Dunkers:
CC2     Aaron Barnum
CC8     Dain Bram
CC11    Daren Green
CC13    Dennis George
CC17    Rick Perkins
CC43    Brian Calloway
DD13    Victor Zenfliende
DD14    Ken Pierce
DD43    Paul Kroyd
DD44    Brian Scoletto
DD55 Wally Flannenbaum
Note: you must use the tab key to separate your columns. Spaces will not work.
Keep your codes short and unique. In this example, each team name is abbreviated with two letters and one or two numbers that match the player’s jersey number. Some of the player’s names are difficult to spell correctly, even if you are familiar with them. By using code replacement, you only have to remember the correct spelling once.

Tip: Codes are case-sensitive. Save keystrokes with code replacement by using codes that are all lower case so you don't have to hit the shift key or use caps lock.  
Once you have created your text file, go to Edit > Settings > Set Code Replacements.
This is where you can define which files contain code replacement data. If there are multiple code replacements, the most recently uploaded file will be used.
The “delimiter” field is the keyboard character you will use to tell Photo Mechanic to do a Code Replacement. The default character is =, but you may change it.
Example: you have a picture with two players, and you can visibly see their jersey numbers in the thumbnail preview of the Metadata (IPTC) Info. You just type in your codes for each player, surrounded by the = character (or your delimiter if you have changed it).



Did you find this article helpful?

Still Need Help?

Still need help? Our support team is waiting to help you.