Find Unused Blocks
Function
Find Unused Blocks analyzes your project and finds blocks that are never called.
Usage
- Connect to a project
- Open the Find Unused icon in the Activity Bar and click Run Find Unused (or run Find Unused from the Command Palette with
Ctrl+Shift+P). The Find Unused editor opens in the editor area. Find Unused is a Pro feature (Pro and above). - Click Find All Unused in the action bar to start the scan. Internally the scan collects the blocks, exports them to XML via the Bridge, builds the call graph, and then finds the unreachable blocks. While scanning, a progress notification reports the current step (the Bridge export progress, followed by an indeterminate 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 |
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+,). Type tiaPortal in the search box to filter to them.
Analysis Scope:
| Setting | Default | Description |
|---|---|---|
| Include Blocks (FC/FB) | On | Include functions and function blocks in the analysis |
| Include Data Blocks (DB) | 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 |
| Analyze Tags | On | Include PLC tags in the call graph analysis |
Exclusions:
| Setting | Description |
|---|---|
| Excluded 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