Searching/Deleting Unused Elements

  1. In the Extras menu, select Show Unused Elements.

    The Search Results view opens below the tabs and combo boxes in the Specification view. It shows all elements listed in the Outline tab, but not used in the CT block.

    An element is used in the component if at least one of the Closedfollowing conditions is fulfilled.

    • The element appears in at least one of the methods of the CT block.

      If the CT block is modeled in C code, the element must appear in a method in at least one of the CT block's variants, regardless of whether that variant is currently selected.

    • The element is an input or output.
    • The included component is a CT block. (Included CT blocks are always used.)
    • An included component contains (directly or indirectly) at least one exported element that is used.

    • An included C code component contains at least one target/arithmetic/implementation combination with an external header that is used globally (activated option Use header global; see Adding a Header File to the Source Module).

  2. In the Elements tab of the Search Results view, select one, several, or all (<Ctrl> + <a>) elements.
  3. Do one of the following:

    • Open the context menu and select Delete.
    • Press <Delete>.

    The selected unused elements are deleted.

See also

Search Results View