Project Search
What it does
Project Search finds text inside the blocks of the connected TIA Portal project. Type a word, a variable name or an expression and the search looks through the content of every OB, FB, FC, DB and PLC data type (UDT), including blocks inside Software Units. Every match is listed with its line and can be opened directly at that line.
Use it to answer questions like:
- "Where is the variable
tempSegmentValueused anywhere in the project?" - "Which blocks declare an input called
enable?" - "Where does the code compare against
T#500MS?"
This complements the other lookups: Quick Open (F7) finds blocks by name, Find in Project lists cross-references of one block, and Project Search is the only one that searches the text content of the blocks.
How to open it
| Trigger | Action |
|---|---|
| Activity bar | Click the Project Search icon, then the Open Project Search button |
| Command palette | Run Project Search |
A connected TIA Portal project is required; without a connection the page offers a Connect button.
Running a search
Type the search text and press Enter or click Search. Three toggles inside the search box refine the query:
- Match Case compares upper and lower case exactly.
- Match Whole Word finds the text only as a complete word.
- Use Regular Expression treats the text as a regular expression.
The first search prepares the project sources and can take a moment, a progress indicator in the status bar shows what is happening and offers Cancel. Repeat searches only pick up blocks that changed since the last search and are fast.
Filtering the results
Two rows of filters narrow the result list, each chip shows how many results it stands for:
- Block type: OB, FB, FC, DB, UDT. Click a chip to show only those blocks, click again to release it.
- Interface or Code: Interface keeps matches in a block's declaration section, the variable declarations before
BEGIN(VAR_INPUT,VAR_OUTPUT,VAR,VAR_TEMP, constants). Code keeps matches in the implementation afterBEGIN. Data blocks and PLC data types count entirely as interface.
So a search for a variable name with the Interface chip active answers "where is it declared", and with the Code chip active "where is it used in logic".
Reading the results
Results group per block: a block row with the block's icon, type, project path and match count, and below it one row per match with the line number, an Interface or Code tag and the matched line with the hit highlighted.
Click a match (or press Enter) to open the block with the matched line selected. Clicking a block row opens the block at its first match.
Notes
- Graphical blocks (LAD, FBD, GRAPH) are searched through their text form on TIA Portal V20 and newer; clicking such a match opens the block in that text form at the line. On older TIA Portal versions these blocks are not text-searched and are still found by name via Quick Open.
- Know-how-protected blocks are not searched.
- Included from the Basic plan.