Searching/Deleting Unused Elements

To delete elements (scalar, composite or complex) not used in the SWC block diagram, proceed as follows:

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

    The Search Results view opens below the drawing area or the editor area. It shows all elements listed in the Outline tab, but not used in the component.

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

    • The element appears in the block diagram or in the ESDL code of the SWC.
    • The element is a method argument or return value.

    • A parameter, constant, or system constant (normal or user-defined) is mapped to a dependent parameter in at least one dataset, regardless of whether that dataset is currently used or not.

    • A system constant (normal or user-defined) is used in the variant size definition of an array or matrix.

    • A distribution is assigned to a group characteristic line/map.

    • A composite or complex element is mapped to an explicit reference in at least one dataset, regardless of whether that dataset is currently used or not.

    • An included class or module 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).

    • An interrunnable variable is mapped to an existing message in the Internal Access tab.
    • At least one element of the SenderReceiver interface is mapped to an existing message.
    • At least one element of the NVData interface is mapped to an existing non-volatile variable.
    • At least one element of the Calibration interface is mapped to an existing parameter.

      Note

      An invalid mapping to an existing parameter, variable, or message does constitute usage, mapping to a non-existent parameter, variable, or message does not constitute usage.

    • The ClientServer interface is used as Pport AND at least one of its runnables is specified in the respective diagram.
    • A SenderReceiver interface Rport contains a mode group AND one of the modes is assigned to a ModeSwitch event.

    NOTICE

    Component functionality may be damaged

    Deleting an element that is unused in the currently loaded variant, but used in other variants, will probably damage the functionality of the other variants.

    To avoid this damage, check the affected variants before you delete the element.

  2. In the Elements tab of the Search Results view, select one, several – e.g., the unused interrunnable variables –, 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

Renaming or Deleting an Element

Reserved Keywords