Using IniSwitcher

IniSwitcher was developed to allow easy switching between DITA-FMx and the built-in FM8 DITA plugin, the default settings are to switch to “DITA-FMx” and “FM8-DITA” however, you can delete these options or add more as needed.

Important: It is very important to backup the INI file before using this command. It will delete or overwrite entries and without a backup, it may be difficult to know what’s gone wrong (if you modify the wrong values).

IniSwitcher is controlled by the Pubs-Tools\IniSwitcher.ini file. The commands that appear on the IniSwitcher menu are defined by entries in this INI file. After installation, open this file in a text editor to modify the functionality.

The General section of the IniSwitcher.ini file contains a Count parameter followed by that number of entries (you are allowed up to 20 entries). Each numbered entry in this section defines a menu item or menu separator. The LastSelected parameter is set to the value of the last selected menu item. (Additional options are available if you need to define multiple groups of settings, for details see Advanced Options.)

The initial state of the IniSwitcher.ini file is shown below. For each numbered parameter value in the General section is a section of the same name.

[General] 
LastSelected= 
Count=2 
1=DITA-FMx 
2=FM8-DITA 
 
[DITA-FMx] 
_restartNeeded=1 
_iniFile=maker.ini 
_iniSection=APIClients 
ditafm=! 
ditafm_app=! 
ditabook=! 
ditaOpenToolkit=! 
ditafmx=Standard, ditafmx, DITA-FMx\ditafmx_80.dll, structured 
ditafmx_app=Standard, ditafmx_app, DITA-FMx\ditafmx_80_app.dll, structured 
ditafmx_book=Standard, ditafmx_book, DITA-FMx\ditafmx_80_book.dll, structured 
 
[FM8-DITA] 
_restartNeeded=1 
_iniFile=maker.ini 
_iniSection=APIClients 
ditafmx=! 
ditafmx_app=! 
ditafmx_book=! 
ditafm=Standard, Translation client for DITA, fminit\ditafm.dll, structured 
ditafm_app=Standard, Translation client for DITA, fminit\ditafm_app.dll, structured 
ditabook=Standard, Translation client for DITA, fminit\ditabook.dll, structured 
ditaOpenToolkit=Standard, DITA Open Toolkit, fminit\openToolkit.dll,structured

Each named section must have the two parameters “_iniFile” and “_iniSection”, these specify the INI file and section to act upon. If the optional parameter “_restartNeeded” is included, the confirmation dialog includes the message that a FrameMaker restart is required. The remaining lines in the section specify entries to add or remove. If a parameter value is set to “!”, that entry will be deleted, otherwise that entry will be updated (or added) with the value specified.

If the _restartNeeded parameter is set to 1, the menu item check mark is not set to the new item until FrameMaker is restarted, otherwise the check mark is changed when the command is run.

In the file shown above, the DITA-FMx section deletes the entries that are specific to the FM8 DITA plugin and adds those needed for DITA-FMx. The FM8-DITA section (not shown) essentially does the opposite, it deletes the DITA-FMx entries and adds the FM8 entries.

Important: As stated above, use this plugin with caution, and always have backups of the INI files you’re modifying.
Tip: If you frequently switch between DITA-FMx and FM8 DITA, we recommend that you change the “app” client name to be the same for both DITA-FMx and FM8 DITA (that’s the name before the equal sign). Use “ditafm_app” or “ditafmx_app,” either is fine it really doesn’t matter. In addition to changing the client names in the INI file, you’ll need to change the UseApiClient values in the structure application definitions file to the same value. This will let you switch between the two DITA plugins and use any of the structure applications easily.