Find Unused Styles

Is there a way to identify unused styles?

First generate a Database Design Report. You need to enable the Advanced functions to get the Tools menu, where you can find the Database Design Report... menu choice. If you don't have a tool that can read the XML format, pic the HTML format and go to the Styles section. For each Style you get where it is used (Layout). If no one is listed, then you found an unused style.

A tool like FMPerception reads the XML file format, and easily presents Unused styles list among others.

@planteg Each layout is assigned a theme, and each theme contains many different styles.

@steverichter Did you mean unused themes or unused styles?

Discovering which themes are in use, or not, is easy. Go to the Theme Manager via File > Manage > Themes... and you'll see a list of Themes and the number of layouts which are using the theme.

Discovering which Styles are in use is more difficult. Using the DDR you use a tool able to resolve an XPATH to search for //CustomStyles/Name. You'll get a list of style names. Remove the duplicates and you have a list of Styles in use. By deduction, if the style is not listed it is not in use.

WARNING If you are using several themes, then you need to take extra steps to discover which theme the style name belongs to.

1 Like