ANY//DOCS
DEBack to site ↗

Find Unused Blocks

Function

Find Unused Blocks analyzes your project and finds blocks that are never called.

Usage

  1. Select the Find Unused icon in the Activity Bar (the search-stop icon on the left edge). The Find Unused page opens straight away in the editor area, and the Side Bar stays as it is. You can also run Find Unused from the Command Palette (Ctrl+Shift+P) or pick Find Unused in the View menu. Opening the page does not start a scan yet. Find Unused is a Pro feature (Pro and above).
  2. If no TIA project is connected, the page shows "Connect to a TIA project to find unused blocks, data types and tags." with a Connect button, and Find All Unused is unavailable. Select Connect to connect to TIA Portal; the page follows the connection and then shows "Select Find All Unused to scan the connected PLC."
  3. Click Find All Unused in the action bar to start the scan. This works right away, even if you have not opened the Project Explorer yet. While scanning, a progress notification reports the current step (the export progress, followed by an Analyzing… status) and Cancel is enabled in the action bar. Clear resets the results.

Results

Results are organized in 8 result tabs, each showing a per-tab count:

Standard Blocks:

Tab Content
Functions Unused functions and function blocks (FC/FB)
Data Blocks Unused global data blocks (DB)
UDTs Unused user-defined data types
Tags Unused PLC tags

Safety Blocks (grouped into their own tabs; deleting them triggers a stronger confirmation):

Tab Content
Safety Functions Unused FFC/FFB blocks
Safety DBs Unused F_DB blocks
Safety UDTs Unused safety data types
Safety Tags Unused safety tags

Results belong to the project they were scanned on. Connecting a different project clears them. While no project is connected, the results stay visible, so you can still export or copy them, but the delete actions are unavailable.

Actions

Select rows in the active result tab (multi-select) and use the left toolbar. Each delete first asks for confirmation, then shows progress with a working Cancel; on completion a notification reports how many items were deleted, the deleted rows vanish from the list, and the summary counts drop. Cancelling mid-run keeps already-deleted items removed and stops the rest.

Selection:

  • Delete Selection - Deletes the rows currently selected in the active tab

Delete by Category:

  • Delete Blocks - Delete all unused FC/FB
  • Delete Data Blocks - Delete all unused DBs
  • Delete UDTs - Delete all unused data types
  • Delete Tags - Delete all unused tags

Delete Safety (with stronger warning):

  • Delete Safety Blocks - Delete all unused FFC/FFB
  • Delete Safety DBs - Delete all unused F_DBs
  • Delete Safety UDTs - Delete all unused F_UDTs
  • Delete Safety Tags - Delete all unused F_Tags

Export:

  • Export to Text - Exports the whole unused list as a text file (a notification names the saved file)
  • Copy All - Copies the whole unused list to the clipboard

With no results, Export to Text / Copy All show a "Nothing to export." message.

Settings

Find Unused options live in Settings (Ctrl+,) in the Find Unused category.

Scan Scope:

Setting Default Description
Include Blocks (FB, FC) On Include functions and function blocks in the analysis
Include Data Blocks On Include global and array data blocks. Instance DBs are always linked to their parent FB
Include UDTs On Include user-defined data types. UDTs referenced by used blocks are marked as used
Include Tags On Include PLC tags in the call graph analysis

Exclusions:

Setting Description
Excluded Name Patterns Wildcard patterns. Items matching any pattern are hidden from the results. Use * for any characters, ? for a single character, case-insensitive.

All settings are saved automatically and persist across restarts.

Notes

  • OBs (Organization Blocks) are never marked as "unused" since they are entry points
  • Safety blocks require Safety login for complete analysis
  • Deleting safety blocks requires confirmation due to safety implications